GNOME Bugzilla – Bug 711260
CLOSE_SOURCE splice flag will not close Soup stream properly
Last modified: 2013-11-04 21:50:21 UTC
Created attachment 258739 [details] Test case Using Gio.OutputStreamSpliceFlags.CLOSE_SOURCE will not close Soup's stream properly and after `max-conns-per-host` requests all the requests to some domain will be blocked. Dan at #libsoup after being presented with attached file > CLOSE_SOURCE with splice_async() is tricky, because the stream gets closed in a different thread, and libsoup doesn't deal with that > i knew about that, but never got around to fixing it, and then forgot > if you could file a bug that would be great. until it gets fixed though, closing the stream manually like you're doing there is the best fix
fixed in git master. The problem was actually not because of splice and threading, it's just that if you cancelled the close() of a SoupClientInputStream (or, as in your case, called g_input_stream_close() with an already-closed cancellable), then the message didn't get fully cleaned-up.