summaryrefslogtreecommitdiffstats
path: root/common/btio.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/btio.c')
-rw-r--r--common/btio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/common/btio.c b/common/btio.c
index 0074d4f9..dbbc4287 100644
--- a/common/btio.c
+++ b/common/btio.c
@@ -148,7 +148,10 @@ static gboolean connect_cb(GIOChannel *io, GIOCondition cond,
conn->connect(io, gerr, conn->user_data);
- g_clear_error(&gerr);
+ if (gerr) {
+ g_io_channel_shutdown(io, FALSE, NULL);
+ g_error_free(gerr);
+ }
return FALSE;
}