Commit 85c6ebb9 authored by Olivier Crête's avatar Olivier Crête

agent: Delay signal emission after the lock has been released

This way, there can be no annoying re-entrancy in our code.
parent 1deee693
......@@ -3724,8 +3724,9 @@ component_io_cb (GSocket *socket, GIOCondition condition, gpointer user_data)
if (g_source_is_destroyed (g_main_current_source ())) {
/* Silently return FALSE. */
nice_debug ("%s: source %p destroyed", G_STRFUNC, g_main_current_source ());
remove_source = TRUE;
goto done;
agent_unlock ();
return G_SOURCE_REMOVE;
}
component = socket_source->component;
......@@ -3875,10 +3876,11 @@ component_io_cb (GSocket *socket, GIOCondition condition, gpointer user_data)
}
done:
g_object_unref (agent);
agent_unlock_and_emit (agent);
g_object_unref (agent);
return !remove_source;
}
......
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