diff options
author | Alex Trotsenko <alex1973tr@gmail.com> | 2015-08-21 13:00:55 +0300 |
---|---|---|
committer | Alex Trotsenko <alex1973tr@gmail.com> | 2015-09-10 12:51:06 +0000 |
commit | c86ca601edfde6e7b6a0769903d86bd48e26d70d (patch) | |
tree | 5dc099fa2f0848f8599f664456258db19a68e270 /src/platformsupport | |
parent | a6ec869211d67fed94e3513dc453a96717155121 (diff) |
Windows socket engine: do not discard datagram on critical failure
On some network conditions, WSARecvFrom() may return WSAECONNRESET
or WSAENETRESET error code to indicate that the connection has been
broken and should be reset. According to MSDN documentation,
WSAECONNRESET mean that the virtual circuit was reset by the remote
side executing a hard or abortive close. Also, it would indicate
that a previous send operation resulted in an ICMP "Port Unreachable"
message. For a datagram socket, WSAENETRESET indicates that the time
to live has expired.
Previously, hasPendingDatagram() discarded datagrams with these
errors and reported no data available. This behavior is incorrect
and can lead to infinite "freezing" of the socket.
This patch allows to handle these notifications as a result of the
readDatagram() call.
Task-number: QTBUG-46552
Change-Id: I7d84babe22d36736b928b4dd4841e30be53d16bd
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/platformsupport')
0 files changed, 0 insertions, 0 deletions