WebListener object emitting updated event names
authorDarren <darren@darrenwhitlen.com>
Fri, 1 Feb 2013 18:28:23 +0000 (18:28 +0000)
committerDarren <darren@darrenwhitlen.com>
Fri, 1 Feb 2013 18:28:23 +0000 (18:28 +0000)
server/kiwi.js
server/weblistener.js

index 1361071e396b50a6b80e04a05deb35d15a3ba997..3f426a9f558f376b061932d0bddfdb145b442d9f 100755 (executable)
@@ -124,7 +124,7 @@ _.each(global.config.servers, function (server) {
         clients.add(client);
     });
 
-    wl.on('destroy', function (client) {
+    wl.on('client_dispose', function (client) {
         clients.remove(client);
     });
 
index 3ab24370abd52d5318a0927ad4cfca5b38bfa550..c67939a2c033abbd687e1a9a98921463fa9b15c1 100644 (file)
@@ -145,8 +145,8 @@ function authoriseConnection(handshakeData, callback) {
 function newConnection(websocket) {
     var client, that = this;
     client = new Client(websocket);
-    client.on('destroy', function () {
-        that.emit('destroy', this);
+    client.on('dispose', function () {
+        that.emit('client_dispose', this);
     });
     this.emit('connection', client);
 }