Page MenuHomePhabricator

Don't explicitly keep track of `_activeListenerCount` in the Aphlict server.
ClosedPublic

Authored by joshuaspence on Jun 15 2014, 7:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 27, 1:32 PM
Unknown Object (File)
Wed, Dec 11, 8:48 PM
Unknown Object (File)
Wed, Dec 11, 3:42 AM
Unknown Object (File)
Thu, Dec 5, 6:02 PM
Unknown Object (File)
Thu, Dec 5, 12:37 AM
Unknown Object (File)
Wed, Dec 4, 12:45 PM
Unknown Object (File)
Wed, Dec 4, 12:42 PM
Unknown Object (File)
Dec 3 2024, 5:11 PM
Subscribers

Details

Summary

The _activeListenerCount variable is overkill, we should be able to achieve the same result using Object.keys(this._listeners).length.

Test Plan

Mucked around in a NodeJS shell.

> Object.keys({}).length
0
> Object.keys({foo: 'bar'}).length
1
> Object.keys({1: 'foo', 2: 'bar'}).length
2

Diff Detail

Repository
rP Phabricator
Branch
aphlictserver-activeListenerCount
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1119
Build 1119: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

joshuaspence retitled this revision from to Don't explicitly keep track of `_activeListenerCount` in the Aphlict server..
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.
This revision is now accepted and ready to land.Jun 15 2014, 7:13 PM
joshuaspence updated this revision to Diff 22908.

Closed by commit rP279a0e53717e (authored by @joshuaspence).