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 --- src/device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit