Commit 4b078694 authored by Michael Catanzaro's avatar Michael Catanzaro

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
parent 9a319a12
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment