diff options
Diffstat (limited to 'src/network/socket/qnativesocketengine.cpp')
-rw-r--r-- | src/network/socket/qnativesocketengine.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/network/socket/qnativesocketengine.cpp b/src/network/socket/qnativesocketengine.cpp index 9e7bb27..a890b3b 100644 --- a/src/network/socket/qnativesocketengine.cpp +++ b/src/network/socket/qnativesocketengine.cpp @@ -779,8 +779,11 @@ qint64 QNativeSocketEngine::read(char *data, qint64 maxSize) close(); return -1; } else if (readBytes == -1) { - d->setError(QAbstractSocket::NetworkError, - QNativeSocketEnginePrivate::ReadErrorString); + if (!d->hasSetSocketError) { + d->hasSetSocketError = true; + d->socketError = QAbstractSocket::NetworkError; + d->socketErrorString = qt_error_string(); + } close(); return -1; } |