summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOgnyan Tonchev <ognyan@axis.com>2014-06-12 13:48:44 +0200
committerWim Taymans <wtaymans@redhat.com>2014-06-18 15:21:23 +0200
commit97152525887e7f8d83a26c739f59e5520383be54 (patch)
treecf2e587c500855341da909584488b91d336875cb
parente327af8a269fce5dc82e4365fe93263e7d68eb55 (diff)
client: Destroy the rtsp watch after connection close
-rw-r--r--gst/rtsp-server/rtsp-client.c9
1 files changed, 9 insertions, 0 deletions
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 *