mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
gioerror: Map WSAENETRESET on Windows to G_IO_ERROR_CONNECTION_CLOSED
This has almost the same semantics as WSAECONNRESET and for all practical purposes is handled the same. The main difference is about *who* reset the connection: the peer or something in the network. For UDP sockets this happens when receiving packets and previously sent packets returned an ICMP "Time(-to-live) expired" message. This is similar to WSAECONNRESET, which on UDP sockets happens when receiving packets and previously sent packets returned an ICMP "Port Unreachable" message.
This commit is contained in:
parent
7224baffe9
commit
a8acbba46a
@ -343,6 +343,7 @@ g_io_error_from_win32_error (gint error_code)
|
|||||||
return G_IO_ERROR_NOT_SUPPORTED;
|
return G_IO_ERROR_NOT_SUPPORTED;
|
||||||
|
|
||||||
case WSAECONNRESET:
|
case WSAECONNRESET:
|
||||||
|
case WSAENETRESET:
|
||||||
case WSAESHUTDOWN:
|
case WSAESHUTDOWN:
|
||||||
return G_IO_ERROR_CONNECTION_CLOSED;
|
return G_IO_ERROR_CONNECTION_CLOSED;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user