Page MenuHomePhabricator

D9554.id22908.diff
No OneTemporary

D9554.id22908.diff

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

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)

Event Timeline