input/soup: set the "ready" flag on failure

Fix deadlock.
This commit is contained in:
Max Kellermann 2011-09-16 07:18:37 +02:00
parent 8b657255cc
commit e99df3a3be

View File

@ -116,6 +116,7 @@ input_soup_session_callback(G_GNUC_UNUSED SoupSession *session,
assert(msg == s->msg); assert(msg == s->msg);
g_mutex_lock(s->mutex); g_mutex_lock(s->mutex);
s->base.ready = true;
s->alive = false; s->alive = false;
g_cond_broadcast(s->cond); g_cond_broadcast(s->cond);
g_mutex_unlock(s->mutex); g_mutex_unlock(s->mutex);
@ -170,6 +171,7 @@ input_soup_got_body(G_GNUC_UNUSED SoupMessage *msg, gpointer user_data)
g_mutex_lock(s->mutex); g_mutex_lock(s->mutex);
s->base.ready = true;
s->eof = true; s->eof = true;
s->alive = false; s->alive = false;