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