mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Fix websocket reconnect race due to async IMO termination.
This commit is contained in:
@@ -265,17 +265,13 @@ class IncomingMessageObserver(
|
||||
}
|
||||
}
|
||||
|
||||
fun terminateAsync() {
|
||||
Log.w(TAG, "Termination Enqueued! ${this.hashCode()}", Throwable())
|
||||
fun terminate() {
|
||||
Log.w(TAG, "Termination! ${this.hashCode()}", Throwable())
|
||||
INSTANCE_COUNT.decrementAndGet()
|
||||
networkConnectionListener.unregister()
|
||||
webSocketStateDisposable.dispose()
|
||||
SignalExecutors.BOUNDED.execute {
|
||||
Log.w(TAG, "Beginning termination. ${this.hashCode()}")
|
||||
terminated = true
|
||||
Log.w(TAG, "Disconnecting auth socket as part of termination")
|
||||
authWebSocket.disconnect()
|
||||
}
|
||||
terminated = true
|
||||
authWebSocket.disconnect()
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
|
||||
Reference in New Issue
Block a user