diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2010-01-25 13:18:03 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2010-01-29 11:13:13 (GMT) |
commit | 62b7a5dcceadeb96a64431ca11cde8187e8882a2 (patch) | |
tree | 1fe1ec754bb3b1d80c00094669573d7c024304bc | |
parent | 1acce689f1276a08dfccf2c754f1aa10f69c90ee (diff) | |
download | Qt-62b7a5dcceadeb96a64431ca11cde8187e8882a2.zip Qt-62b7a5dcceadeb96a64431ca11cde8187e8882a2.tar.gz Qt-62b7a5dcceadeb96a64431ca11cde8187e8882a2.tar.bz2 |
QNativeSocketEngine: Also handle unknown errors from socket engine
Task-number: QTBUG-7316
Task-number: QTBUG-7317
Reviewed-by: thiago
(cherry picked from commit ef89c6a9f39924a3c8366ad9522b42e7b1915b01)
-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; } |