Skip to content

Commit

Permalink
Fix problem where Domain user count was not being zeroed on inactivity.
Browse files Browse the repository at this point in the history
  • Loading branch information
Misterblue committed Feb 5, 2021
1 parent ca75711 commit 9fa357a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Entities/Domains.ts
Expand Up @@ -46,7 +46,7 @@ export function initDomains(): void {
setInterval( async () => {
// Find domains that are not heartbeating and reset activity if not talking
for await (const aDomain of Domains.enumerateAsync(new GenericFilter(
{ 'timeOfLastHeartbeat': { '$lt': Domains.dateWhenNotActive },
{ 'timeOfLastHeartbeat': { '$lt': Domains.dateWhenNotActive() },
'$or': [ { 'numUsers': { '$gt': 0 } }, { 'anonUsers': { '$gt': 0 } } ]
}) ) ) {
Logger.info(`Domains: domain ${aDomain.name} not heartbeating. Zeroing users.`);
Expand Down

0 comments on commit 9fa357a

Please sign in to comment.