mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-01 06:36:47 +00:00
Resubscribe listeners when subscription link breaks.
// FREEBIE
This commit is contained in:
1 parent
2e429c5b35
commit
41d30fc8dc
1 file changed
+13
@@ -64,6 +64,12 @@ public class PubSubManager {
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void resubscribeAll() {
|
||||
for (String serializedAddress : listeners.keySet()) {
|
||||
baseListener.subscribe(serializedAddress.getBytes());
|
||||
}
|
||||
}
|
||||
|
||||
private synchronized void waitForSubscription() {
|
||||
try {
|
||||
while (!subscribed) {
|
||||
@@ -149,6 +155,13 @@ public class PubSubManager {
|
||||
subscribed = true;
|
||||
PubSubManager.this.notifyAll();
|
||||
}
|
||||
|
||||
threaded.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
resubscribeAll();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user