diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-24 17:49:24 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-24 17:49:24 +0200 |
commit | 4594c36cf35c1ce6231e8b09111b3bc14d30b292 (patch) | |
tree | 4c16d950d3711299ef9d159484ae5c2724dd411a | |
parent | 43a026b8883399a8a72bdf902a4befb83edf2dc6 (diff) |
Shutdown IO channel in the case of error
-rw-r--r-- | common/btio.c | 5 |
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; } |