Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

Commit

Permalink
Merge "change variable name" into 0.3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie Edward authored and Gerrit Code Review committed Jan 17, 2013
2 parents b70a5f1 + 23aa2b0 commit ab03bbc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/connectors/hybi/wsprocessor.js
Expand Up @@ -11,10 +11,10 @@ var ST_CLOSED = 2;
*/ */
var Processor = function() { var Processor = function() {
EventEmitter.call(this); EventEmitter.call(this);
this.mockServer = new HttpServer(); this.httpServer = new HttpServer();


var self = this; var self = this;
this.wsServer = new WebSocketServer({server: this.mockServer}); this.wsServer = new WebSocketServer({server: this.httpServer});


this.wsServer.on('connection', function(socket) { this.wsServer.on('connection', function(socket) {
// emit socket to outside // emit socket to outside
Expand All @@ -31,7 +31,7 @@ Processor.prototype.add = function(socket, data) {
if(this.state !== ST_STARTED) { if(this.state !== ST_STARTED) {
return; return;
} }
this.mockServer.emit('connection', socket); this.httpServer.emit('connection', socket);
socket.emit('data', data); socket.emit('data', data);
}; };


Expand All @@ -42,5 +42,5 @@ Processor.prototype.close = function() {
this.state = ST_CLOSED; this.state = ST_CLOSED;
this.wsServer.close(); this.wsServer.close();
this.wsServer = null; this.wsServer = null;
this.mockServer = null; this.httpServer = null;
}; };

0 comments on commit ab03bbc

Please sign in to comment.