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) {