soup_session_abort: fix a race condition in SoupSessionSync
authorDan Winship <danw@gnome.org>
Wed, 20 Apr 2011 14:18:57 +0000 (10:18 -0400)
committerDan Winship <danw@gnome.org>
Mon, 25 Apr 2011 15:11:14 +0000 (11:11 -0400)
commit4fccc7a2464075e83e572a7907cc11831cddd872
tree5249a33895057e0995458a0b10e5b549375a000e
parent42f9135da10dffe6d26f1bc6c70fa41fb211b627
soup_session_abort: fix a race condition in SoupSessionSync

soup_session_abort() on a SoupSessionSync would sometimes crash,
because of races between the cancellation of the pending messages and
the destruction of the open connections. Fix this by waiting for all
of the messages to finish cancelling before we start closing the
connections.
libsoup/soup-session-sync.c
libsoup/soup-session.c
libsoup/soup-session.h