Commit 751e8f58 authored by Ole André Vadla Ravnås's avatar Ole André Vadla Ravnås Committed by Olivier Crête

agent: Consume data before removing disconnected socket

This was caught by tests randomly failing (timing out).
parent b10eb7ae
......@@ -5827,8 +5827,9 @@ component_io_cb (GSocket *gsocket, GIOCondition condition, gpointer user_data)
return G_SOURCE_REMOVE;
}
/* Remove disconnected sockets when we get a HUP */
if (condition & G_IO_HUP) {
/* Remove disconnected sockets when we get a HUP and there's no more data to
* be read. */
if (condition & G_IO_HUP && !(condition & G_IO_IN)) {
nice_debug ("Agent %p: NiceSocket %p has received HUP", agent,
socket_source->socket);
if (component->selected_pair.local &&
......
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