avoid crash at device (re)start
This commit is contained in:
@ -426,9 +426,9 @@ class BaresipService: Service() {
|
|||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.d(LOG_TAG, "Receiver nr has not been registered")
|
Log.d(LOG_TAG, "Receiver nr has not been registered")
|
||||||
}
|
}
|
||||||
nm.cancelAll()
|
if (this::nm.isInitialized) nm.cancelAll()
|
||||||
if (wl.isHeld) wl.release()
|
if (this::wl.isInitialized && wl.isHeld) wl.release()
|
||||||
if (fl.isHeld) fl.release()
|
if (this::fl.isInitialized && fl.isHeld) fl.release()
|
||||||
if (IS_SERVICE_RUNNING)
|
if (IS_SERVICE_RUNNING)
|
||||||
baresipStop(false)
|
baresipStop(false)
|
||||||
else if (RESTARTING)
|
else if (RESTARTING)
|
||||||
|
|||||||
Reference in New Issue
Block a user