mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-11-30 01:16:50 +00:00
Log cases where a watch is set before the previous one is resolved
This commit is contained in:
1 parent
faff0e1751
commit
f9b490c24f
1 file changed
+7
+7
@@ -417,6 +417,13 @@ class FoundationDbMessagePublisher {
|
||||
// If we're already in a terminal state, we don't want to set a watch that would leak
|
||||
return;
|
||||
}
|
||||
|
||||
if (watchFuture != null && !watchFuture.isDone()) {
|
||||
LOGGER.warn("Setting a watch before previous watch future is done");
|
||||
}
|
||||
|
||||
cancelWatch();
|
||||
|
||||
// Set a watch that will be triggered when new messages arrive. When it is triggered, we attempt to fetch messages
|
||||
// again (if there is demand). When we run out of messages, this method will be called again, setting another watch,
|
||||
// and so on, thus achieving a "watch for new messages -> read -> publish" loop.
|
||||
|
||||
Reference in new issue
Block a user