From 895239acf05077c7700875cb722e50bfa8b45ead Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 24 Feb 2009 17:50:04 +0200 Subject: Only call g_io_channel_shutdown if the connection was actually successfull --- audio/control.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'audio') diff --git a/audio/control.c b/audio/control.c index 5be51fe7..c11151e2 100644 --- a/audio/control.c +++ b/audio/control.c @@ -617,7 +617,8 @@ static void avctp_connect_cb(GIOChannel *chan, GError *err, gpointer data) if (!session) { debug("avctp_connect_cb: session removed while connecting"); - g_io_channel_shutdown(chan, TRUE, NULL); + if (!err) + g_io_channel_shutdown(chan, TRUE, NULL); g_io_channel_unref(chan); return; } -- cgit