From 141955b3b40327c7933174eec912a10736b7c1ba Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Fri, 11 Jun 2021 10:08:04 +0100 Subject: [PATCH] More server disconnection cleanup --- udpserver.cpp | 3 ++- udpserver.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/udpserver.cpp b/udpserver.cpp index 13d4b9c..1b27f21 100644 --- a/udpserver.cpp +++ b/udpserver.cpp @@ -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* 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; diff --git a/udpserver.h b/udpserver.h index 8acef4b..26252d7 100644 --- a/udpserver.h +++ b/udpserver.h @@ -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();