From b8418fdeffe287513bb2c8306122a5eac86686a3 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 21 Oct 2015 14:41:50 +0300 Subject: [PATCH] core: Fix double ATT connect() upon failure If we fail connecting ATT we should not attempt to call device_browse_gatt(). This would only trigger a new connect attempt which would likely also fail. --- src/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device.c b/src/device.c index 0d3a6554a..ffcd1bc5e 100644 --- a/src/device.c +++ b/src/device.c @@ -4788,7 +4788,7 @@ done: } if (device->connect) { - if (!device->le_state.svc_resolved) + if (!device->le_state.svc_resolved && !err) device_browse_gatt(device, NULL); if (err < 0) -- 2.47.3