soup-session: fix a deadlock when aborting a SoupSessionSync
authorDan Winship <danw@gnome.org>
Wed, 9 Jan 2013 22:21:13 +0000 (17:21 -0500)
committerDan Winship <danw@gnome.org>
Wed, 9 Jan 2013 22:22:42 +0000 (17:22 -0500)
We need to signal conn_cond when removing an item from the queue,
since flush_queue() expects that... (and also, since in some cases,
removing a message from the queue will allow another one to start).

https://bugzilla.gnome.org/show_bug.cgi?id=691399

libsoup/soup-session.c

index 3b23846..c4abe1d 100644 (file)
@@ -1422,6 +1422,7 @@ soup_session_unqueue_item (SoupSession          *session,
        g_mutex_lock (&priv->conn_lock);
        host = get_host_for_message (session, item->msg);
        host->num_messages--;
+       g_cond_broadcast (&priv->conn_cond);
        g_mutex_unlock (&priv->conn_lock);
 
        /* g_signal_handlers_disconnect_by_func doesn't work if you