p2p: Wrap conn.flags ops with atomic.Load/Store

This commit is contained in:
Andrey Petrov
2018-06-07 21:50:08 -04:00
parent 193a402cc0
commit 6209545083
3 changed files with 28 additions and 20 deletions

View File

@ -189,12 +189,10 @@ func TestServerDial(t *testing.T) {
}
done <- true
}()
// Trigger potential race conditions
peer = srv.Peers()[0]
_ = peer.Inbound()
_ = peer.Info()
<-done
case <-time.After(1 * time.Second):
t.Error("server did not launch peer within one second")