Call LocalPeer.Encode, not Peer.Encode!
We need the former's locking. Fixes #883.
This commit is contained in:
1 parent
94f18f7004
commit
ca133d6d9b
1 file changed
+1
-1
+1
-1
@@ -135,7 +135,7 @@ func (peers *Peers) EncodePeers(names PeerNameSet) []byte {
|
||||
for name := range names {
|
||||
if peer, found := peers.table[name]; found {
|
||||
if peer == peers.ourself.Peer {
|
||||
peers.ourself.Peer.Encode(enc)
|
||||
peers.ourself.Encode(enc)
|
||||
} else {
|
||||
peer.Encode(enc)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user