Skip to content

Commit

Permalink
Upgrade and fix (openhab#16167)
Browse files Browse the repository at this point in the history
Signed-off-by: Leo Siepel <[email protected]>
  • Loading branch information
lsiepel authored Jan 1, 2024
1 parent d53bf5d commit 057de3e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bundles/org.openhab.binding.bluetooth.bluez/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<dependency>
<groupId>com.github.hypfvieh</groupId>
<artifactId>bluez-dbus-osgi</artifactId>
<version>0.1.3</version>
<version>0.1.4</version>
<scope>provided</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.freedesktop.dbus.errors.NoReply;
import org.freedesktop.dbus.errors.UnknownObject;
import org.freedesktop.dbus.exceptions.DBusException;
import org.freedesktop.dbus.exceptions.DBusExecutionException;
import org.freedesktop.dbus.types.UInt16;
Expand Down Expand Up @@ -195,7 +196,12 @@ public boolean disconnect() {
BluetoothDevice dev = device;
if (dev != null) {
logger.debug("Disconnecting '{}'", address);
return dev.disconnect();
try {
return dev.disconnect();
} catch (UnknownObject exception) {
logger.debug("Failed to disconnect the device, UnknownObject", exception);
return false;
}
}
return false;
}
Expand Down

0 comments on commit 057de3e

Please sign in to comment.