After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 725313 - rtspconnection: closed() callback is never called in tunneled mode
rtspconnection: closed() callback is never called in tunneled mode
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 1.2.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-02-27 13:28 UTC by Ognyan Tonchev (redstar_)
Modified: 2014-03-03 09:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Call closed() when client disconnects GET channel (8.57 KB, patch)
2014-03-03 07:59 UTC, Ognyan Tonchev (redstar_)
committed Details | Review

Description Ognyan Tonchev (redstar_) 2014-02-27 13:28:20 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.
Comment 1 Ognyan Tonchev (redstar_) 2014-02-28 08:08:45 UTC
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.
Comment 2 Ognyan Tonchev (redstar_) 2014-02-28 08:10:20 UTC
Sorry, i meant input pollable stream source on the write socket.
Comment 3 Ognyan Tonchev (redstar_) 2014-03-03 07:59:04 UTC
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.
Comment 4 Wim Taymans 2014-03-03 09:41:22 UTC
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