Call LocalPeer.Encode, not Peer.Encode!

We need the former's locking.

Fixes #883.
This commit is contained in:
Matthias Radestock committed 2015-06-09 17:19:36 +01:00
1 parent 94f18f7004
commit ca133d6d9b
1 file changed
+1 -1
+1 -1
View File
@@ -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)
}