ttorrent icon indicating copy to clipboard operation
ttorrent copied to clipboard

Tracker can't start again after stopping

Open TraumaER opened this issue 9 years ago • 3 comments

tracker.start() works to begin my tracker, but if I want to stop the tracker while the app is running via tracker.stop() and then start it again by tracker.start() I get

2016-03-13 16:06:59.300 ERROR 1144 --- [ tracker:6969] c.t.t.t.Tracker : Could not start the tracker: Connection is closed!

I'm not recreating the tracker object in between stop and start.

TraumaER avatar Mar 13 '16 22:03 TraumaER

Do you need to stop the tracker? Can't you just remove the tracked torrent ?

tracker.remove(trackedTorrent)

zanella avatar Oct 03 '16 21:10 zanella

Ah yeah, I guess that's because the creation of the connection needs to be moved to the start() method:

https://github.com/mpetazzoni/ttorrent/blob/master/core/src/main/java/com/turn/ttorrent/tracker/Tracker.java#L109

Do you feel like you could submit a PR for this (and test that it fixes your problem)?

mpetazzoni avatar Oct 06 '16 19:10 mpetazzoni

Move the creation of the connection to the start() work for me.

thiennt8 avatar Oct 27 '17 10:10 thiennt8