mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
gio: return G_IO_NVAL if the socket is already closed
For consistency with Unix behaviour, as checked in the tests/socket.c. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
83d45c4f35
commit
2f8a9196b8
@ -3997,7 +3997,10 @@ socket_source_dispatch (GSource *source,
|
||||
gboolean ret;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
events = update_condition (socket_source->socket);
|
||||
if ((socket_source->pollfd.revents & G_IO_NVAL) != 0)
|
||||
events = G_IO_NVAL;
|
||||
else
|
||||
events = update_condition (socket_source->socket);
|
||||
#else
|
||||
if (g_socket_is_closed (socket_source->socket))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user