GNOME Bugzilla – Bug 761257
multisocketsink: doesn't handle client close and EWOULDBLOCK
Last modified: 2016-04-14 17:43:02 UTC
Created attachment 319947 [details] [review] Patch for 1.6 branch This change http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/gst/tcp/gstmultisocketsink.c?id=6db2ee56b6e862f54c479e553f179daf2056da74 rendered the 'client close'-handling inert (navail == 0). The change was made to fix: https://bugzilla.gnome.org/show_bug.cgi?id=743834. The use case here lead to navail==0 and EWOULDBLOCK. The attached patch re-enables client close handling and also handle EWOULDBLOCK. I've verified both the 'client close'-case and the 'EWOULDBLOCK'-case are properly handled with the patch on 1.6.
Created attachment 319948 [details] [review] Patch for master Applied logic of 1.6 patch to master branch (untested)
Thanks, pushed to master with minor indentation changes. Will pick into 1.6 if nothing comes up: commit 8c4d3c6aa9fd0816210ac8b03d958647208bf589 Author: Tom Deseyn <tom.deseyn@gmail.com> Date: Thu Jan 28 16:26:47 2016 +0100 multisocketsink: handle client close correctly and EWOULDBLOCK Fixes 100% cpu usage when client disconnects. Commit 6db2ee56 would just make multisocketsink ignore reads of 0 bytes without removing the client, so we'd get woken up over and over again for the client. Fix the original issue differently by handling the non-fatal error code. https://bugzilla.gnome.org/show_bug.cgi?id=761257 https://bugzilla.gnome.org/show_bug.cgi?id=743834
Thanks Tim!