Closed trim21 closed 3 years ago
That's fair, but what goroutine?
@anacrolix
the init()
function I found
https://github.com/anacrolix/dht/blob/8664e9f7c6297c595065b6345b13e71bdad47c74/dht.go#L106-L108
@Trim21 Thanks!
@Trim21 can you take a look at the PR?
Looks good
Thanks
I'm trying to use this as part of my project, and the BT/DHT function is not always needed, it's only some part of my application.
So the dht/v2 as a library start a goroutine in the background running forever is very weird.
I think this goroutine should be started when the BT client is created, not the library is imported, library itself shoule bt side-effect free.