Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14002741
D9554.id22908.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1023 B
Referenced Files
None
Subscribers
None
D9554.id22908.diff
View Options
diff --git a/support/aphlict/server/lib/AphlictListenerList.js b/support/aphlict/server/lib/AphlictListenerList.js
--- a/support/aphlict/server/lib/AphlictListenerList.js
+++ b/support/aphlict/server/lib/AphlictListenerList.js
@@ -9,14 +9,12 @@
members: {
_listeners: null,
_nextID: 0,
- _activeListenerCount: 0,
_totalListenerCount: 0,
addListener: function(socket) {
var listener = new JX.AphlictListener(this._generateNextID(), socket);
this._listeners[listener.getID()] = listener;
- this._activeListenerCount++;
this._totalListenerCount++;
return listener;
@@ -26,7 +24,6 @@
var id = listener.getID();
if (id in this._listeners) {
delete this._listeners[id];
- this._activeListenerCount--;
}
},
@@ -42,7 +39,7 @@
},
getActiveListenerCount: function() {
- return this._activeListenerCount;
+ return Object.keys(this._listeners).length;
},
getTotalListenerCount: function() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 26, 9:51 PM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6719415
Default Alt Text
D9554.id22908.diff (1023 B)
Attached To
Mode
D9554: Don't explicitly keep track of `_activeListenerCount` in the Aphlict server.
Attached
Detach File
Event Timeline
Log In to Comment