From 97152525887e7f8d83a26c739f59e5520383be54 Mon Sep 17 00:00:00 2001 From: Ognyan Tonchev Date: Thu, 12 Jun 2014 13:48:44 +0200 Subject: [PATCH] client: Destroy the rtsp watch after connection close --- gst/rtsp-server/rtsp-client.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c index fb44a29..4a8214f 100644 --- a/gst/rtsp-server/rtsp-client.c +++ b/gst/rtsp-server/rtsp-client.c @@ -795,6 +795,15 @@ close_connection (GstRTSPClient * client) } gst_rtsp_connection_close (priv->connection); + + /* connection is now closed, destroy the watch which will also cause the + * closed signal to be emitted */ + if (priv->watch) { + GST_DEBUG ("client %p: destroying watch", client); + g_source_destroy ((GSource *) priv->watch); + priv->watch = NULL; + gst_rtsp_client_set_send_func (client, NULL, NULL, NULL); + } } static gchar * -- 2.7.4