diff options
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/socket/qnativesocketengine.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/socket/qnativesocketengine.cpp b/src/network/socket/qnativesocketengine.cpp index 6e1df93..9e7bb27 100644 --- a/src/network/socket/qnativesocketengine.cpp +++ b/src/network/socket/qnativesocketengine.cpp @@ -778,6 +778,11 @@ qint64 QNativeSocketEngine::read(char *data, qint64 maxSize) QNativeSocketEnginePrivate::RemoteHostClosedErrorString); close(); return -1; + } else if (readBytes == -1) { + d->setError(QAbstractSocket::NetworkError, + QNativeSocketEnginePrivate::ReadErrorString); + close(); + return -1; } return readBytes; } |