Drop the check for duplicate connections in the handshake

Duplicate connections are also detected and handled in AddConnection,
I have not been able to reproduce #182 without the check, so although
it may once have been necessary, it doesn't seem to be needed now.
This commit is contained in:
David Wragg authored and Matthias Radestock committed 2015-07-08 09:03:51 +01:00
1 parent a6a74001bd
commit 5e10b901a3
1 file changed
-3
-3
View File
@@ -86,9 +86,6 @@ func (conn *LocalConnection) handshake(acceptNewPeer bool) (TCPReceiver, error)
return nil, fmt.Errorf("Found unknown remote name: %s at %s", name, conn.remoteTCPAddr)
}
}
if existingConn, found := conn.Router.Ourself.ConnectionTo(name); found && existingConn.Established() {
return nil, fmt.Errorf("Already have connection to %s at %s", existingConn.Remote(), existingConn.RemoteTCPAddr())
}
uid, err := ParsePeerUID(uidStr)
if err != nil {
return nil, err