Add an 'outbound' field on each connection,

and only attempt new connections to the remote side of outbound connections.
This commit is contained in:
Bryan Boreham committed 2015-03-11 11:56:47 +00:00
1 parent 6f89ead9bd
commit 89fce7f98a
8 files changed
+26 -14

No files matched your search

+1 -1
View File
@@ -111,7 +111,7 @@ func (peer *LocalPeer) CreateConnection(peerAddr string, acceptNewPeer bool) err
if err != nil {
return err
}
connRemote := NewRemoteConnection(peer.Peer, nil, tcpConn.RemoteAddr().String(), false)
connRemote := NewRemoteConnection(peer.Peer, nil, tcpConn.RemoteAddr().String(), false, true)
connLocal := NewLocalConnection(connRemote, tcpConn, udpAddr, peer.Router)
connLocal.Start(acceptNewPeer)
return nil