mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-01 05:13:06 +02: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;
|
gboolean ret;
|
||||||
|
|
||||||
#ifdef G_OS_WIN32
|
#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
|
#else
|
||||||
if (g_socket_is_closed (socket_source->socket))
|
if (g_socket_is_closed (socket_source->socket))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user