aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/soup_input_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/input/soup_input_plugin.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/input/soup_input_plugin.c b/src/input/soup_input_plugin.c
index 38a607045..7a2f3b47a 100644
--- a/src/input/soup_input_plugin.c
+++ b/src/input/soup_input_plugin.c
@@ -246,12 +246,14 @@ input_soup_close(struct input_stream *is)
if (s->alive) {
assert(s->msg != NULL);
+ s->alive = false;
+ g_mutex_unlock(s->mutex);
+
soup_session_cancel_message(soup_session, s->msg,
SOUP_STATUS_CANCELLED);
- s->alive = false;
- }
+ } else
+ g_mutex_unlock(s->mutex);
- g_mutex_unlock(s->mutex);
g_mutex_free(s->mutex);
g_cond_free(s->cond);