input/soup: unlock before cancelling the soup message
Avoid recursive deadlock in _session_callback().
This commit is contained in:
parent
9ea8a840a9
commit
0ef15e5fac
@ -246,12 +246,14 @@ input_soup_close(struct input_stream *is)
|
|||||||
if (s->alive) {
|
if (s->alive) {
|
||||||
assert(s->msg != NULL);
|
assert(s->msg != NULL);
|
||||||
|
|
||||||
|
s->alive = false;
|
||||||
|
g_mutex_unlock(s->mutex);
|
||||||
|
|
||||||
soup_session_cancel_message(soup_session, s->msg,
|
soup_session_cancel_message(soup_session, s->msg,
|
||||||
SOUP_STATUS_CANCELLED);
|
SOUP_STATUS_CANCELLED);
|
||||||
s->alive = false;
|
} else
|
||||||
}
|
|
||||||
|
|
||||||
g_mutex_unlock(s->mutex);
|
g_mutex_unlock(s->mutex);
|
||||||
|
|
||||||
g_mutex_free(s->mutex);
|
g_mutex_free(s->mutex);
|
||||||
g_cond_free(s->cond);
|
g_cond_free(s->cond);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user