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:
Jarek Radosz 2024-06-04 20:15:27 +02:00 committed by GitHub
parent 4236aa0851
commit bbdf14828b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -595,6 +595,10 @@ export default class PresenceService extends Service {
// drop back to the last event via the regular throttle function.
@bind
_throttledUpdateServer() {
if (this.isDestroying || this.isDestroyed) {
return;
}
if (
!this._lastUpdate ||
new Date() - this._lastUpdate > PRESENCE_THROTTLE_MS