From 5e10b901a3837495fb052277f90b8b6955dd44c4 Mon Sep 17 00:00:00 2001 From: David Wragg Date: Wed, 1 Jul 2015 12:11:31 +0100 Subject: [PATCH] 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. --- router/handshake.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/router/handshake.go b/router/handshake.go index 2411ae72..dd57d5df 100644 --- a/router/handshake.go +++ b/router/handshake.go @@ -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