mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 14:18:04 +01:00
Don't request more messages if we already have an active message source
This commit is contained in:
committed by
Jon Chambers
parent
8e429e267f
commit
89c7521be0
@@ -244,6 +244,11 @@ class RedisDynamoDbMessagePublisher implements MessageAvailabilityListener, Flow
|
||||
return;
|
||||
}
|
||||
|
||||
if (messageSourceSubscriber != null) {
|
||||
// We're still working through a previous message source; wait until it completes before starting a new one.
|
||||
return;
|
||||
}
|
||||
|
||||
if (storedMessageState == StoredMessageState.EMPTY) {
|
||||
// We don't think there are any messages in either message source; don't do anything until the situation changes
|
||||
// (when new messages arrive, we'll come back to this point with a non-empty stored message state)
|
||||
@@ -359,6 +364,7 @@ class RedisDynamoDbMessagePublisher implements MessageAvailabilityListener, Flow
|
||||
|
||||
if (messageSourceSubscriber != null) {
|
||||
messageSourceSubscriber.dispose();
|
||||
messageSourceSubscriber = null;
|
||||
}
|
||||
|
||||
// Stop receiving signals about new messages/conflicting consumers
|
||||
|
||||
Reference in New Issue
Block a user