Prevent race condition when closing/reopening message receiver.

This commit is contained in:
Cody Henthorne
2021-04-12 11:07:22 -04:00
committed by Greyson Parrelli
parent ac0216d916
commit eda2b87a57
2 changed files with 2 additions and 8 deletions

View File

@@ -184,12 +184,6 @@ public class ApplicationDependencies {
}
public static @NonNull SignalServiceMessageReceiver getSignalServiceMessageReceiver() {
SignalServiceMessageReceiver local = messageReceiver;
if (local != null) {
return local;
}
synchronized (LOCK) {
if (messageReceiver == null) {
messageReceiver = provider.provideSignalServiceMessageReceiver();