From f0789cc147d7311e69542d7f8a2fe783f9ba34ca Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Thu, 1 Dec 2016 00:28:23 +0100 Subject: [PATCH] Pebble 2/LE: fix another bug when reconnecting --- .../devices/pebble/ble/PebbleLESupport.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 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 3016dc5c..0b9ac531 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 @@ -57,6 +57,14 @@ public class PebbleLESupport { mPebbleGATTClient.close(); mPebbleGATTClient = null; } + try { + mPipedInputStream.close(); + } catch (IOException ignore) { + } + try { + mPipedOutputStream.close(); + } catch (IOException ignore) { + } } synchronized void createPipedInputReader() { @@ -78,14 +86,6 @@ public class PebbleLESupport { } mPipeReader = null; } - try { - mPipedInputStream.close(); - } catch (IOException ignore) { - } - try { - mPipedOutputStream.close(); - } catch (IOException ignore) { - } } void setMTU(int mtu) {