mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 13:52:50 +08:00
DEV: Check lifecycle props in Presence service (#27328)
This may or may not fix flakes in `Unit | Service | presence` tests
This commit is contained in:
parent
4236aa0851
commit
bbdf14828b
|
@ -595,6 +595,10 @@ export default class PresenceService extends Service {
|
||||||
// drop back to the last event via the regular throttle function.
|
// drop back to the last event via the regular throttle function.
|
||||||
@bind
|
@bind
|
||||||
_throttledUpdateServer() {
|
_throttledUpdateServer() {
|
||||||
|
if (this.isDestroying || this.isDestroyed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!this._lastUpdate ||
|
!this._lastUpdate ||
|
||||||
new Date() - this._lastUpdate > PRESENCE_THROTTLE_MS
|
new Date() - this._lastUpdate > PRESENCE_THROTTLE_MS
|
||||||
|
|
Loading…
Reference in New Issue
Block a user