From b878fa5eda7b0fdc9496e74be2bd534be32da1e0 Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Wed, 30 Nov 2016 22:28:34 +0100 Subject: [PATCH] Pebble LE/Pebble 2: Fix reconnect not working when first attempt fails --- .../service/devices/pebble/ble/PebbleLESupport.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/ble/PebbleLESupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/ble/PebbleLESupport.java index 6c351bb1..97aaaad5 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/ble/PebbleLESupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/pebble/ble/PebbleLESupport.java @@ -76,13 +76,12 @@ public class PebbleLESupport { } catch (InterruptedException e) { LOG.error(e.getMessage()); } - try { - mPipedOutputStream.close(); - } catch (IOException ignore) { - } - mPipeReader = null; } + try { + mPipedInputStream.close(); + } catch (IOException ignore) { + } } void setMTU(int mtu) {