geeksville
2020-04-10 17:49:43 -07:00
parent 03a8ff67e5
commit 2ba398cc51

View File

@@ -180,8 +180,11 @@ class RadioInterfaceService : Service(), Logging {
// Force the service to reconnect
val s = runningService
if (s != null) {
info("shutting down old service")
s.setEnabled(false) // nasty, needed to force the next setEnabled call to reconnect
// Ignore any errors that happen while closing old device
exceptionReporter {
info("shutting down old service")
s.setEnabled(false) // nasty, needed to force the next setEnabled call to reconnect
}
info("Setting enable on the running radio service")
s.setEnabled(addr != null)
}