[gnome-network-displays/cc-tmp: 51/80] cc: don't call the finish function when disconnected
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-network-displays/cc-tmp: 51/80] cc: don't call the finish function when disconnected
- Date: Fri, 9 Sep 2022 12:03:51 +0000 (UTC)
commit 4522bea103b6a8c768cface8dc01cbdeddc09cc3
Author: Anupam Kumar <kyteinsky gmail com>
Date: Sun Sep 4 14:29:11 2022 +0530
cc: don't call the finish function when disconnected
src/cc/cc-ctrl.c | 3 +++
src/nd-cc-sink.c | 1 +
2 files changed, 4 insertions(+)
---
diff --git a/src/cc/cc-ctrl.c b/src/cc/cc-ctrl.c
index 0682b7c..67ab16f 100644
--- a/src/cc/cc-ctrl.c
+++ b/src/cc/cc-ctrl.c
@@ -672,6 +672,9 @@ cc_ctrl_connection_init (CcCtrl *ctrl, gchar *remote_address)
void
cc_ctrl_finish (CcCtrl *ctrl)
{
+ if (ctrl->state == CC_CTRL_STATE_DISCONNECTED)
+ return;
+
g_clear_handle_id (&ctrl->ping_timeout_handle, g_source_remove);
g_clear_handle_id (&ctrl->waiting_check_timeout_handle, g_source_remove);
diff --git a/src/nd-cc-sink.c b/src/nd-cc-sink.c
index 0cacc81..b5337a6 100644
--- a/src/nd-cc-sink.c
+++ b/src/nd-cc-sink.c
@@ -414,6 +414,7 @@ static void
nd_cc_sink_sink_stop_stream_int (NdCCSink *self)
{
cc_ctrl_finish (&self->ctrl);
+ self->ctrl.state = CC_CTRL_STATE_DISCONNECTED;
self->cancellable = g_cancellable_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]