fix memory leak from incorrect delete call
This commit is contained in:
parent
849a74fdc3
commit
20276891e6
@ -64,6 +64,7 @@ void AOClient::clientDisconnected()
|
||||
false;
|
||||
server->updateCharsTaken(server->areas[current_area]);
|
||||
}
|
||||
cleanup();
|
||||
}
|
||||
|
||||
void AOClient::handlePacket(AOPacket packet)
|
||||
|
@ -83,7 +83,7 @@ void Server::clientConnected()
|
||||
connect(socket, &QTcpSocket::disconnected, this, [=] {
|
||||
qDebug() << "removed client" << client->getIpid();
|
||||
clients.removeAll(client);
|
||||
delete client;
|
||||
client->deleteLater();
|
||||
});
|
||||
connect(socket, &QTcpSocket::readyRead, client, &AOClient::clientData);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user