[glib: 1/2] gioerror: Map WSAENETRESET on Windows to G_IO_ERROR_CONNECTION_CLOSED
- From: Nirbheek Chauhan <nirbheekc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] gioerror: Map WSAENETRESET on Windows to G_IO_ERROR_CONNECTION_CLOSED
- Date: Tue, 18 Aug 2020 09:46:37 +0000 (UTC)
commit a8acbba46a3161add008d50830740fb0201f560a
Author: Sebastian Dröge <sebastian centricular com>
Date: Mon Aug 17 13:11:22 2020 +0300
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.
gio/gioerror.c | 1 +
1 file changed, 1 insertion(+)
---
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]