summaryrefslogtreecommitdiff
path: root/gio/gioerror.c
diff options
context:
space:
mode:
Diffstat (limited to 'gio/gioerror.c')
-rw-r--r--gio/gioerror.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gio/gioerror.c b/gio/gioerror.c
index fbae67d45..dbf42d6a9 100644
--- a/gio/gioerror.c
+++ b/gio/gioerror.c
@@ -242,6 +242,12 @@ g_io_error_from_errno (gint err_no)
break;
#endif
+#ifdef ECONNRESET
+ case ECONNRESET:
+ return G_IO_ERROR_CONNECTION_CLOSED;
+ break;
+#endif
+
default:
return G_IO_ERROR_FAILED;
break;
@@ -305,6 +311,11 @@ g_io_error_from_win32_error (gint error_code)
case WSAEAFNOSUPPORT:
return G_IO_ERROR_NOT_SUPPORTED;
+ case WSAECONNRESET:
+ case WSAECONNABORTED:
+ case WSAECONNSHUTDOWN:
+ return G_IO_ERROR_CONNECTION_CLOSED;
+
default:
return G_IO_ERROR_FAILED;
}