More server disconnection cleanup

merge-requests/5/head
Phil Taylor 2021-06-11 10:08:04 +01:00
rodzic 7a8dbf172b
commit 141955b3b4
2 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -250,6 +250,7 @@ void udpServer::controlReceived()
deleteConnection(&civClients, current->civClient);
}
deleteConnection(&controlClients, current);
return; // We mustn't do anything else as the connection has now gone.
}
break;
}
@ -1512,7 +1513,7 @@ void udpServer::sendRetransmitRequest(CLIENT* c)
void udpServer::deleteConnection(QList<CLIENT*>* l, CLIENT* c)
{
qInfo(logUdpServer()) << "Deleting connection to: " << c->ipAddress.toString() << ":" << QString::number(c->port);
qInfo(logUdpServer()) << "Deleting" << c->type << "connection to: " << c->ipAddress.toString() << ":" << QString::number(c->port);
if (c->idleTimer != Q_NULLPTR) {
c->idleTimer->stop();
delete c->idleTimer;

Wyświetl plik

@ -118,8 +118,8 @@ private:
quint8 civId;
bool isAuthenticated;
CLIENT* controlClient = Q_NULLPTR;
CLIENT* civClient=Q_NULLPTR;
CLIENT* audioClient=Q_NULLPTR;
CLIENT* civClient = Q_NULLPTR;
CLIENT* audioClient = Q_NULLPTR;
};
void controlReceived();