Always include local peer in Peers

This commit is contained in:
David Wragg committed 2015-06-12 16:22:13 +01:00
1 parent c09f0f7037
commit 203dfbb3e9
3 files changed
+3 -3

No files matched your search

+3 -1
View File
@@ -33,10 +33,12 @@ type ConnectionSummary struct {
}
func NewPeers(ourself *LocalPeer, onGC func(*Peer)) *Peers {
return &Peers{
peers := &Peers{
ourself: ourself,
table: make(map[PeerName]*Peer),
onGC: onGC}
peers.FetchWithDefault(ourself.Peer)
return peers
}
func (peers *Peers) FetchWithDefault(peer *Peer) *Peer {