diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2020-08-17 13:11:22 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2020-08-17 13:14:46 +0300 |
commit | a8acbba46a3161add008d50830740fb0201f560a (patch) | |
tree | 0489052d27f44f61b3f6874c9ef93cbfcd8415ad /gio | |
parent | 7224baffe92e5c0c46a2b9d5838e71012b38a195 (diff) | |
download | glib-a8acbba46a3161add008d50830740fb0201f560a.tar.gz |
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.
Diffstat (limited to 'gio')
-rw-r--r-- | gio/gioerror.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gio/gioerror.c b/gio/gioerror.c index 1ec120d98..477906c0c 100644 --- a/gio/gioerror.c +++ b/gio/gioerror.c @@ -343,6 +343,7 @@ g_io_error_from_win32_error (gint error_code) return G_IO_ERROR_NOT_SUPPORTED; case WSAECONNRESET: + case WSAENETRESET: case WSAESHUTDOWN: return G_IO_ERROR_CONNECTION_CLOSED; |