diff options
author | Andy Shaw <qt-info@nokia.com> | 2009-06-08 06:03:17 (GMT) |
---|---|---|
committer | Andy Shaw <qt-info@nokia.com> | 2009-06-08 06:03:17 (GMT) |
commit | 3b2b9d727f0fadf607968c73003e7550c8bd0296 (patch) | |
tree | 7ff7a65a6c76024fed82fbf01ac86aa2f381d09f /src/network | |
parent | 0fafad31feb518453c7c25b2e29a8b26d7018978 (diff) | |
download | Qt-3b2b9d727f0fadf607968c73003e7550c8bd0296.zip Qt-3b2b9d727f0fadf607968c73003e7550c8bd0296.tar.gz Qt-3b2b9d727f0fadf607968c73003e7550c8bd0296.tar.bz2 |
Set the error to be HostUnreacheable if WSAEHOSTUNREACH is recieved
This was a contribution sent via the public bugs channel.
Task-number: 255161
Reviewed-by: Marius Storm-Olsen
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/socket/qnativesocketengine_win.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp index b08d7b0..8c6cd31 100644 --- a/src/network/socket/qnativesocketengine_win.cpp +++ b/src/network/socket/qnativesocketengine_win.cpp @@ -570,6 +570,11 @@ bool QNativeSocketEnginePrivate::nativeConnect(const QHostAddress &address, quin socketState = QAbstractSocket::UnconnectedState; break; } + if (value == WSAEHOSTUNREACH) { + setError(QAbstractSocket::NetworkError, HostUnreachableErrorString); + socketState = QAbstractSocket::UnconnectedState; + break; + } } // fall through } |