diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-24 17:50:04 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-24 17:50:04 +0200 |
commit | 895239acf05077c7700875cb722e50bfa8b45ead (patch) | |
tree | 2a14f7543196ea2968dd049564b279f3e21c9372 /src | |
parent | 4594c36cf35c1ce6231e8b09111b3bc14d30b292 (diff) |
Only call g_io_channel_shutdown if the connection was actually successfull
Diffstat (limited to 'src')
-rw-r--r-- | src/device.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/device.c b/src/device.c index 582f659f..9b32379a 100644 --- a/src/device.c +++ b/src/device.c @@ -1653,7 +1653,8 @@ static void bonding_connect_cb(GIOChannel *io, GError *err, gpointer user_data) uint16_t handle; if (!device->bonding) { - g_io_channel_shutdown(io, TRUE, NULL); + if (!err) + g_io_channel_shutdown(io, TRUE, NULL); return; } |