summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-01-25 13:18:03 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-01-25 14:27:33 (GMT)
commitef89c6a9f39924a3c8366ad9522b42e7b1915b01 (patch)
treecbbb8fbce6cd4084ef2c069acd167abcbcaeb0c6
parent8cdab74082019c0b8a57883a11aa5093a644abdd (diff)
downloadQt-ef89c6a9f39924a3c8366ad9522b42e7b1915b01.zip
Qt-ef89c6a9f39924a3c8366ad9522b42e7b1915b01.tar.gz
Qt-ef89c6a9f39924a3c8366ad9522b42e7b1915b01.tar.bz2
QNativeSocketEngine: Also handle unknown errors from socket engine
Task-number: QTBUG-7316 Task-number: QTBUG-7317 Reviewed-by: thiago
-rw-r--r--src/network/socket/qnativesocketengine.cpp5
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;
}