Преглед изворни кода

p2p: fix dial throttling race condition

Péter Szilágyi пре 10 година
родитељ
комит
2060bc8bac
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      p2p/server.go

+ 1 - 1
p2p/server.go

@@ -427,8 +427,8 @@ func (srv *Server) dialLoop() {
 		srv.peerWG.Add(1)
 		go func() {
 			srv.dialNode(dest)
-			dialed <- dest
 			slots <- struct{}{}
+			dialed <- dest
 		}()
 	}