mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 23:02:24 +02:00
Merge pull request #15234 from SimonWalton-HiFi/clear-connection-on-add-node
When adding new Node clear any dangling Connection objects
This commit is contained in:
commit
ac0130d4c7
1 changed files with 3 additions and 0 deletions
|
@ -677,6 +677,9 @@ SharedNodePointer LimitedNodeList::addOrUpdateNode(const QUuid& uuid, NodeType_t
|
|||
// If there is a new node with the same socket, this is a reconnection, kill the old node
|
||||
removeOldNode(findNodeWithAddr(publicSocket));
|
||||
removeOldNode(findNodeWithAddr(localSocket));
|
||||
// If there is an old Connection to the new node's address kill it
|
||||
_nodeSocket.cleanupConnection(publicSocket);
|
||||
_nodeSocket.cleanupConnection(localSocket);
|
||||
|
||||
auto it = _connectionIDs.find(uuid);
|
||||
if (it == _connectionIDs.end()) {
|
||||
|
|
Loading…
Reference in a new issue