mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-26 01:58:06 +01:00
Resubscribe listeners when subscription link breaks.
// FREEBIE
This commit is contained in:
@@ -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