|
|
|
@ -44,7 +44,7 @@ public final class ClosedGroupPoller : NSObject {
|
|
|
|
|
// Might be a race condition that the setUpPolling finishes too soon,
|
|
|
|
|
// and the timer is not created, if we mark the group as is polling
|
|
|
|
|
// after setUpPolling. So the poller may not work, thus misses messages.
|
|
|
|
|
isPolling[groupPublicKey] = true
|
|
|
|
|
internalQueue.sync{ isPolling[groupPublicKey] = true }
|
|
|
|
|
setUpPolling(for: groupPublicKey)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -55,7 +55,7 @@ public final class ClosedGroupPoller : NSObject {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public func stopPolling(for groupPublicKey: String) {
|
|
|
|
|
isPolling[groupPublicKey] = false
|
|
|
|
|
internalQueue.sync{ isPolling[groupPublicKey] = false }
|
|
|
|
|
timers[groupPublicKey]?.invalidate()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|