From 85b3b1fe144f88378117a8cd292149687dfbaafb Mon Sep 17 00:00:00 2001 From: scatterflower Date: Fri, 4 Sep 2020 14:39:21 -0500 Subject: [PATCH] do thing properly hehheheheh --- include/aoclient.h | 1 - src/aoclient.cpp | 6 +----- src/server.cpp | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/include/aoclient.h b/include/aoclient.h index 7139da4..e312b9c 100644 --- a/include/aoclient.h +++ b/include/aoclient.h @@ -31,7 +31,6 @@ class AOClient : public QObject { public: AOClient(Server* p_server, QTcpSocket* p_socket, QObject* parent = nullptr); ~AOClient(); - void cleanup(); QString getHwid(); void setHwid(QString p_hwid); diff --git a/src/aoclient.cpp b/src/aoclient.cpp index 14951b9..1169f33 100644 --- a/src/aoclient.cpp +++ b/src/aoclient.cpp @@ -64,7 +64,6 @@ void AOClient::clientDisconnected() false; server->updateCharsTaken(server->areas[current_area]); } - cleanup(); } void AOClient::handlePacket(AOPacket packet) @@ -302,9 +301,6 @@ void AOClient::setHwid(QString p_hwid) QString AOClient::getIpid() { return ipid; } -void AOClient::cleanup() { - socket->disconnectFromHost(); +AOClient::~AOClient() { socket->deleteLater(); } - -AOClient::~AOClient() {} diff --git a/src/server.cpp b/src/server.cpp index f10281c..4ef6fbb 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -136,7 +136,6 @@ AOClient* Server::getClient(QString ipid) Server::~Server() { for (AOClient* client : clients) { - client->cleanup(); client->deleteLater(); } server->deleteLater();