SoupHTTPInputStream: don't burn through GCancellable fds
authorDan Winship <danw@gnome.org>
Mon, 23 Jan 2012 17:34:12 +0000 (12:34 -0500)
committerDan Winship <danw@gnome.org>
Mon, 23 Jan 2012 17:38:06 +0000 (12:38 -0500)
commit856df33301221711789f0db744fce951eb70ba76
tree31a1e2d39ee95c48c2d6c843996f6cf852168e18
parent5c20e8186fa241f31e4c0d07ec94aa40337b4db3
SoupHTTPInputStream: don't burn through GCancellable fds

SoupSession limits the number of outgoing TCP connections, but
SoupRequestHTTP/SoupHTTPInputStream were still using a file descriptor
for the GCancellable of each request that got queued, even before it
was sent. This meant that if the app queued 1000ish requests all at
once (eg, while rendering an HTML page with *lots* of images), we
would run out of file descriptors.

Fix this by just using the GCancellable::cancelled signal rather than
g_cancellable_get_fd().

https://bugzilla.gnome.org/show_bug.cgi?id=668508
libsoup/soup-http-input-stream.c