Bladeren bron

prevent deadlock with fill and node down

Chris Bannister 10 jaren geleden
bovenliggende
commit
f145b65bb9
1 gewijzigde bestanden met toevoegingen van 3 en 1 verwijderingen
  1. 3 1
      connectionpool.go

+ 3 - 1
connectionpool.go

@@ -401,7 +401,9 @@ func (pool *hostConnPool) fill() {
 			// probably unreachable host
 			go pool.fillingStopped()
 
-			pool.session.handleNodeDown(net.ParseIP(pool.host.Peer()), pool.port)
+			// this is calle with the connetion pool mutex held, this call will
+			// then recursivly try to lock it again. FIXME
+			go pool.session.handleNodeDown(net.ParseIP(pool.host.Peer()), pool.port)
 			return
 		}