diff options
author | Simon Rettberg | 2023-03-13 12:23:40 +0100 |
---|---|---|
committer | Simon Rettberg | 2023-03-13 12:23:40 +0100 |
commit | a5bd11f3a75c2a2e1a9611db2aa1ae679c452aa8 (patch) | |
tree | f5daecfa1a0ae373aeeb388e7187a6c6550ca3b0 /src/client | |
parent | Add more debug output to discovery part (diff) | |
download | pvs2-master.tar.gz pvs2-master.tar.xz pvs2-master.zip |
Server now properly sends a connection termination reason to the client,
which will log it to the console, for better debugging.
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/net/serverconnection.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/net/serverconnection.cpp b/src/client/net/serverconnection.cpp index aae7538..690ba23 100644 --- a/src/client/net/serverconnection.cpp +++ b/src/client/net/serverconnection.cpp @@ -103,6 +103,11 @@ void ServerConnection::handleMsg() _lastData = QDateTime::currentMSecsSinceEpoch() + PING_TIMEOUT_MS; const QString &id = _fromServer.getFieldString(_ID); + if (id == _ERROR) { + qWarning() << "Server sent error message:" << _fromServer.getFieldString(_ERROR); + return; + } + if (_authed == 0) { if (id == _CHALLENGE) { // Initial challenge request by server |