diff options
author | Alex Trotsenko <alex1973tr@gmail.com> | 2015-12-08 16:14:57 +0200 |
---|---|---|
committer | Alex Trotsenko <alex1973tr@gmail.com> | 2016-01-04 06:39:31 +0000 |
commit | 55f0343a99ffd920e2e14ba2bb7669d78224fe42 (patch) | |
tree | 5d917c39e41f55b766d747c09d9e6a06118d911b /src/network/socket/qnativesocketengine_p.h | |
parent | 090bf50771ec1e5d089b0ae0488059a5643883b2 (diff) |
Do not discard WSAECONNRESET error code from UDP under Windows
When a datagram is sent to a closed host/port combination, the host will
likely send back an ICMP error message. In the regular socket API, there
isn't a good way of actually receiving this error, so some Windows kernels
wired that message back up to the call to WSARecvFrom() as a synthetic
datagram. Reading this datagram results in a WSAECONNRESET error code,
which should reported to the user as a refused connection attempt.
To make the errors a bit more informative, the native error strings for
WSAECONNRESET and WSAENETRESET were also added.
Task-number: QTBUG-49301
Change-Id: If659be54ba1b39965b5f481f0c0cb9eeea0a06d2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
Diffstat (limited to 'src/network/socket/qnativesocketengine_p.h')
-rw-r--r-- | src/network/socket/qnativesocketengine_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/socket/qnativesocketengine_p.h b/src/network/socket/qnativesocketengine_p.h index c49ef2c3ad..e540b47069 100644 --- a/src/network/socket/qnativesocketengine_p.h +++ b/src/network/socket/qnativesocketengine_p.h @@ -229,6 +229,8 @@ public: NotSocketErrorString, InvalidProxyTypeString, TemporaryErrorString, + NetworkDroppedConnectionErrorString, + ConnectionResetErrorString, UnknownSocketErrorString = -1 }; |