mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
Upgrade and fix (#16167)
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
This commit is contained in:
parent
d53bf5dda1
commit
057de3e73b
@ -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>
|
||||
|
||||
|
@ -22,6 +22,7 @@ import java.util.concurrent.TimeUnit;
|
||||
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;
|
||||
@ -195,7 +196,12 @@ public class BlueZBluetoothDevice extends BaseBluetoothDevice implements BlueZEv
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user