2
0
mirror of synced 2025-02-25 04:25:16 +00:00

Fixed lingering polling timer when no events left to process in a provider.

This commit is contained in:
Richard Moore 2018-10-14 19:01:53 -04:00
parent f682861e0b
commit d54609a458
No known key found for this signature in database
GPG Key ID: 525F70A6FCABC295

View File

@ -1212,6 +1212,8 @@ export class BaseProvider extends Provider {
return !(event.once); return !(event.once);
}); });
if (this.listenerCount() === 0) { this.polling = false; }
return result; return result;
} }
@ -1261,6 +1263,7 @@ export class BaseProvider extends Provider {
return this; return this;
} }
} }
defineReadOnly(Provider, 'inherits', inheritable(Provider)); defineReadOnly(Provider, 'inherits', inheritable(Provider));