]> git.basschouten.com Git - openhab-addons.git/commitdiff
Upgrade and fix (#16167)
authorlsiepel <leosiepel@gmail.com>
Mon, 1 Jan 2024 14:30:28 +0000 (15:30 +0100)
committerGitHub <noreply@github.com>
Mon, 1 Jan 2024 14:30:28 +0000 (15:30 +0100)
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
bundles/org.openhab.binding.bluetooth.bluez/pom.xml
bundles/org.openhab.binding.bluetooth.bluez/src/main/java/org/openhab/binding/bluetooth/bluez/internal/BlueZBluetoothDevice.java

index 6a2e4a55a8f0e34f0238fb3b1b9cbd5a3df4a4ee..40f651a3032e65ded3ce3e385dd4093b4b776d66 100644 (file)
@@ -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>
 
index d92bc360974d746a8a1541586f37b3fcdd49dfd6..ed75d91daf0a0c6b31627eab70bca6fa04601751 100644 (file)
@@ -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;
     }