diff options
-rw-r--r-- | examples/java/DBTPeripheral00.java | 2 | ||||
-rw-r--r-- | trial/java/trial/org/direct_bt/DBTServer00.java | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/examples/java/DBTPeripheral00.java b/examples/java/DBTPeripheral00.java index 8589258e..1de34acb 100644 --- a/examples/java/DBTPeripheral00.java +++ b/examples/java/DBTPeripheral00.java @@ -621,7 +621,9 @@ public class DBTPeripheral00 { // already unpaired stopAdvertising(device.getAdapter(), "device-disconnected"); + device.remove(); BTDeviceRegistry.removeFromProcessingDevices(device.getAddressAndType()); + try { Thread.sleep(100); // wait a little (FIXME: Fast restart of advertising error) } catch (final InterruptedException e) { } diff --git a/trial/java/trial/org/direct_bt/DBTServer00.java b/trial/java/trial/org/direct_bt/DBTServer00.java index 713504c5..5610efc1 100644 --- a/trial/java/trial/org/direct_bt/DBTServer00.java +++ b/trial/java/trial/org/direct_bt/DBTServer00.java @@ -659,7 +659,9 @@ public class DBTServer00 implements DBTServerTest { BTUtils.println(System.err, "****** Disconnected Device (count "+(servedConnections.get()+1)+"): Start "+device.toString()); // already unpaired + device.remove(); BTDeviceRegistry.removeFromProcessingDevices(device.getAddressAndType()); + try { Thread.sleep(100); // wait a little (FIXME: Fast restart of advertising error) } catch (final InterruptedException e) { } |