smarthomej / addons

SmartHome/J addons for openHAB
Eclipse Public License 2.0
59 stars 23 forks source link

[androiddebugbridge] Handle java.net.ConnectException #392

Closed cweitkamp closed 1 year ago

cweitkamp commented 1 year ago
2022-07-21 21:46:10.383 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: 
java.net.ConnectException: Stream open actively rejected by remote peer
        at com.tananaev.adblib.AdbConnection.open(AdbConnection.java:342) ~[?:?]
        at org.smarthomej.binding.androiddebugbridge.internal.AndroidDebugBridgeDevice.lambda$0(AndroidDebugBridgeDevice.java:451) ~[?:?]
        at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
        at java.lang.Thread.run(Unknown Source) [?:?]

This does not look like the best solution but other exceptions are handled in a similar way. imo the java.net.ConnectException can be catched seperately and handled that way.

Signed-off-by: Christoph Weitkamp github@christophweitkamp.de