mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-27 06:29:54 +00:00
Fix NPE in libsignal-net sendKeepAlive.
This commit is contained in:
committed by
Greyson Parrelli
parent
4474d1fc9e
commit
20cecbd5cd
@@ -289,7 +289,11 @@ class LibSignalChatConnection(
|
||||
|
||||
override fun sendKeepAlive() {
|
||||
CHAT_SERVICE_LOCK.withLock {
|
||||
if (isDead()) {
|
||||
// This is a stronger check than isDead, to handle the case where chatConnection may be null
|
||||
// because we are still connecting.
|
||||
// TODO [andrew]: Decide if this is the right behavior long term, or if we want to queue these
|
||||
// like we plan to queue other requests long term.
|
||||
if (state.value != WebSocketConnectionState.CONNECTED) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user