2
0
mirror of synced 2025-02-24 06:38:14 +00:00

dht: Fix race

This commit is contained in:
Matt Joiner 2015-02-10 00:21:22 +11:00
parent a7946c773e
commit 2b3d286e9e

View File

@ -128,7 +128,9 @@ func (me *peerDiscovery) closingCh() chan struct{} {
}
func (me *peerDiscovery) announcePeer(to dHTAddr, token string) {
me.server.mu.Lock()
err := me.server.announcePeer(to, me.infoHash, me.announcePort, token, me.announcePortImplied)
me.server.mu.Unlock()
if err != nil {
logonce.Stderr.Printf("error announcing peer: %s", err)
}