soup-session: don't mark CONNECTING connections IDLE on cancel
authorDan Winship <danw@gnome.org>
Thu, 1 Mar 2012 16:34:37 +0000 (11:34 -0500)
committerDan Winship <danw@gnome.org>
Thu, 1 Mar 2012 16:34:37 +0000 (11:34 -0500)
commita36a9e9868f8dd1e6d1339216751c4b3c1b34880
tree1e0e63f452af6c65fb6e4d3392b489d3bbade75d
parentcfd4afd6aad86f9dd98013dab041c32d07a0013b
soup-session: don't mark CONNECTING connections IDLE on cancel

When finishing up a queue item, SoupSession was always marking its
connection IDLE, even if it had previously been CONNECTING. This
created a race condition where if lots of pending connections were
cancelled at once, some of them might see connections labelled IDLE
that didn't actually have a SoupSocket (before those connections got
asynchronously cleaned up). Fix this by only marking connections IDLE
if they had previously been IN_USE.

https://bugzilla.gnome.org/show_bug.cgi?id=667245
libsoup/soup-session.c