No need to close the socket, it is done automatically

https://doc.qt.io/qt-6/qtcpsocket.html#dtor.QTcpSocket
This commit is contained in:
iTrooz 2024-11-17 18:51:57 +01:00
parent cba7e2dc36
commit 8cf0c2029c
No known key found for this signature in database
GPG Key ID: 8B83F77667B1BC6A
2 changed files with 0 additions and 6 deletions

View File

@ -95,10 +95,6 @@ public:
return doc.object();
}
void close() {
socket.close();
}
private:
// From https://wiki.vg/Protocol#VarInt_and_VarLong
void writeVarInt(QByteArray &data, int value) {

View File

@ -148,8 +148,6 @@ class ServerPingTask : public Task {
int online = client.getOnlinePlayers();
qDebug() << "Online players: " << online;
m_server.m_currentPlayers = online;
client.close();
});
resolver->ping();
}