summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gatchat/gatmux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gatchat/gatmux.c b/gatchat/gatmux.c
index 139edd2e..ea87c211 100644
--- a/gatchat/gatmux.c
+++ b/gatchat/gatmux.c
@@ -722,7 +722,8 @@ static void mux_setup_cb(gboolean ok, GAtResult *result, gpointer user_data)
channel = g_at_chat_get_channel(msd->chat);
channel = g_io_channel_ref(channel);
- g_at_chat_shutdown(msd->chat);
+ g_at_chat_unref(msd->chat);
+ msd->chat = NULL;
flags = g_io_channel_get_flags(channel) | G_IO_FLAG_NONBLOCK;
g_io_channel_set_flags(channel, flags, NULL);