Cleanup connection on node kills

This commit is contained in:
Atlante45 2015-08-26 16:07:47 +02:00
parent 373d4b8944
commit c96632d4b6
2 changed files with 7 additions and 1 deletions

View file

@ -428,6 +428,10 @@ void LimitedNodeList::handleNodeKill(const SharedNodePointer& node) {
qCDebug(networking) << "Killed" << *node;
node->stopPingTimer();
emit nodeKilled(node);
if (auto activeSocket = node->getActiveSocket()) {
_nodeSocket.cleanupConnection(*activeSocket);
}
}
SharedNodePointer LimitedNodeList::addOrUpdateNode(const QUuid& uuid, NodeType_t nodeType,

View file

@ -73,10 +73,12 @@ public:
ConnectionStats::Stats sampleStatsForConnection(const HifiSockAddr& destination);
std::vector<HifiSockAddr> getConnectionSockAddrs();
public slots:
void cleanupConnection(HifiSockAddr sockAddr);
private slots:
void readPendingDatagrams();
void rateControlSync();
void cleanupConnection(HifiSockAddr sockAddr);
private:
void setSystemBufferSizes();