mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Fix deadlock/ANR in IncomingMessageObserver and SignalWebSOcket.
This commit is contained in:
@@ -155,11 +155,11 @@ class IncomingMessageObserver(
|
||||
|
||||
AppForegroundObserver.addListener(object : AppForegroundObserver.Listener {
|
||||
override fun onForeground() {
|
||||
onAppForegrounded()
|
||||
SignalExecutors.BOUNDED.execute { onAppForegrounded() }
|
||||
}
|
||||
|
||||
override fun onBackground() {
|
||||
onAppBackgrounded()
|
||||
SignalExecutors.BOUNDED.execute { onAppBackgrounded() }
|
||||
}
|
||||
})
|
||||
|
||||
@@ -177,8 +177,10 @@ class IncomingMessageObserver(
|
||||
}
|
||||
|
||||
authWebSocket.addKeepAliveChangeListener {
|
||||
lock.withLock {
|
||||
connectionNecessarySemaphore.release()
|
||||
SignalExecutors.BOUNDED.execute {
|
||||
lock.withLock {
|
||||
connectionNecessarySemaphore.release()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user