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();