mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 15:36:17 +01:00
socket: actually remove fd from poll when socket is closed
In my previous patch, I failed to call g_source_remove_unix_fd() in order to actually stop polling the fd of the closed socket. The test did not catch this, because the test only checks that the right source callback is dispatched properly. I don't know how to test this. https://bugzilla.gnome.org/show_bug.cgi?id=723655
This commit is contained in:
parent
9a319a126e
commit
4b07869462
@ -3796,6 +3796,8 @@ socket_source_dispatch (GSource *source,
|
||||
#else
|
||||
if (g_socket_is_closed (socket_source->socket))
|
||||
{
|
||||
if (socket_source->fd_tag)
|
||||
g_source_remove_unix_fd (source, socket_source->fd_tag);
|
||||
socket_source->fd_tag = NULL;
|
||||
events = G_IO_NVAL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user