souphttpsrc: Clean up all pending operations from libsoup before unreffing our context
authorSebastian Dröge <sebastian@centricular.com>
Thu, 8 May 2014 07:49:24 +0000 (09:49 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 8 May 2014 08:18:38 +0000 (10:18 +0200)
commit2a7abc98dbd5a184dd83c57370c690436040fdec
tree92119c51b0690531e626d231c4d83d1592aca323
parentc3bd2bdcf493ba6c6dcd5bde4a67b8e0beeb21eb
souphttpsrc: Clean up all pending operations from libsoup before unreffing our context

When we cancel connection attempts and similar things, there are still
some operations pending on our main context from the GCancellables. We
should let them all run before unreffing our context, otherwise we leak
file descriptors.

Unfortunately this requires libsoup 2.47.0 or newer as earlier versions
steal our main context from us and we can't use it for cleanup later
without assertions and funny crashes.

Based on a patch by Dmitry Shatrov <shatrov@gmail.com>.

https://bugzilla.gnome.org/show_bug.cgi?id=663944
ext/soup/gstsouphttpsrc.c