during RPTL of a peer that is already connected, use disconnectPeer instead of trying to directly delete the connection, although this may cause problems of its own...;

pull/121/merge
Bryan Biedenkapp 1 week ago
parent 616b6c730a
commit cbc4a6848a

@ -1194,7 +1194,7 @@ void TrafficNetwork::taskNetworkRx(NetPacketRequest* req)
if (connection->connectionState() == NET_STAT_RUNNING) { if (connection->connectionState() == NET_STAT_RUNNING) {
LogInfoEx(LOG_MASTER, "PEER %u (%s) resetting peer connection, connectionState = %u", peerId, connection->identWithQualifier().c_str(), LogInfoEx(LOG_MASTER, "PEER %u (%s) resetting peer connection, connectionState = %u", peerId, connection->identWithQualifier().c_str(),
connection->connectionState()); connection->connectionState());
delete connection; network->disconnectPeer(peerId, connection);
connection = new FNEPeerConnection(peerId, req->address, req->addrLen); connection = new FNEPeerConnection(peerId, req->address, req->addrLen);
connection->lastPing(now); connection->lastPing(now);

Loading…
Cancel
Save

Powered by TurnKey Linux.