Merge pull request #184 from bboreham/182_unstable_connections
Extra check for duplicate connection Fixes #182.
This commit is contained in:
commit
3cc7b383ad
1 file changed
+3
@@ -345,6 +345,9 @@ func (conn *LocalConnection) handshake(acceptNewPeer bool) error {
|
||||
return fmt.Errorf("Found unknown remote name: %s at %s", name, conn.remoteTCPAddr)
|
||||
}
|
||||
}
|
||||
if existingConn, found := conn.local.ConnectionTo(name); found && existingConn.Established() {
|
||||
return fmt.Errorf("Already have connection to %s at %s", name, existingConn.RemoteTCPAddr())
|
||||
}
|
||||
|
||||
uidStr, err := checkHandshakeStringField("UID", "", handshakeRecv)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user