GNOME Bugzilla – Bug 725313
rtspconnection: closed() callback is never called in tunneled mode
Last modified: 2014-03-03 09:47:06 UTC
The closed() callback should be called when the GET channel is disconnected in tunneled mode but currently it is not. The RTSP watch will also remain but it will never get dispatched unless there the write source is created and attached to a context, but that is only the case if there is queued data. One side effect is that the rtsp-server does not know when a client closes the tunnel and the RTSPClient object will be leaked. Previously the closed() callback was called and the RTSP watch removed when the POST channel was disconnected. This was also wrong and was fixed by this commit: commit ebe3530f5177d5b22ab60fc6d00a16281a4caa80 Author: Ognyan Tonchev <ognyan@axis.com> Date: Wed Feb 19 13:53:06 2014 +0100 rtspconnection: Remove read child source when POST is disconnected One solution would be to always create the write source, even if there is no queued data to be written, and thus be able to detect errors on the output channel as well.
After discussing the problem on IRC with Wim we will be probably adding an output pollable stream source on the read socket in case the write source is not added. This way we will be able to detect when the GET channel is closed in tunneled mode.
Sorry, i meant input pollable stream source on the write socket.
Created attachment 270759 [details] [review] Call closed() when client disconnects GET channel This patch seems to work fine, i have also fixed a unit test for it.
commit 422044244177f23a6351837170863a02305341c2 Author: Ognyan Tonchev <ognyan@axis.com> Date: Sun Mar 2 11:58:58 2014 +0100 rtspconnection: Call closed() when GET is closed in tunneled mode This patch adds read source on the write socket in tunneled mode and we get a callback when client disconnects the GET channel. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725313