1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-10 14:34:24 +08:00

fixed dht race #270

This commit is contained in:
Juan Batiz-Benet
2014-11-05 08:49:55 -08:00
parent 65f95a1940
commit 70f796afd6
2 changed files with 19 additions and 4 deletions

View File

@ -417,14 +417,14 @@ func TestConnectCollision(t *testing.T) {
done := make(chan struct{})
go func() {
_, err = dhtA.Connect(ctx, peerB)
_, err := dhtA.Connect(ctx, peerB)
if err != nil {
t.Fatal(err)
}
done <- struct{}{}
}()
go func() {
_, err = dhtB.Connect(ctx, peerA)
_, err := dhtB.Connect(ctx, peerA)
if err != nil {
t.Fatal(err)
}