diff options
| author | Karol Kosek <krkk@krkk.ct8.pl> | 2021-01-20 21:26:41 +0100 |
|---|---|---|
| committer | Felix Queißner <felix@ib-queissner.de> | 2021-01-21 09:42:45 +0100 |
| commit | ef592c41848ded6253502a536abedb298aed1105 (patch) | |
| tree | c105061ed362463c1c2fa539855fb38f0e07a88d /src/protocols/gopherclient.cpp | |
| parent | b8365a5031a84df275a76162809af9df74ca4c73 (diff) | |
| download | kristall-ef592c41848ded6253502a536abedb298aed1105.tar.gz | |
GopherClient: suppress remote socket closure error
Removes 'unhandled network error: QAbstractSocket::RemoteHostClosedError'
from logs. Mostly copy-pasted from GeminiClient::socketError. :^)
Diffstat (limited to 'src/protocols/gopherclient.cpp')
| -rw-r--r-- | src/protocols/gopherclient.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/protocols/gopherclient.cpp b/src/protocols/gopherclient.cpp index af2b141..a55ae0c 100644 --- a/src/protocols/gopherclient.cpp +++ b/src/protocols/gopherclient.cpp @@ -123,5 +123,12 @@ void GopherClient::on_finished() void GopherClient::on_socketError(QAbstractSocket::SocketError error_code) { - this->emitNetworkError(error_code, socket.errorString()); + // When remote host closes session, the client closes the socket. + // This is more sane then erroring out here as it's a perfectly legal + // state and we know the connection has ended. + if (error_code == QAbstractSocket::RemoteHostClosedError) { + return; + } else { + this->emitNetworkError(error_code, socket.errorString()); + } } |
