summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-02-24 17:49:24 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2009-02-24 17:49:24 +0200
commit4594c36cf35c1ce6231e8b09111b3bc14d30b292 (patch)
tree4c16d950d3711299ef9d159484ae5c2724dd411a
parent43a026b8883399a8a72bdf902a4befb83edf2dc6 (diff)
Shutdown IO channel in the case of error
-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;
}