Permalink
Browse files

Merge "change variable name" into 0.3.x

  • Loading branch information...
Charlie Edward Gerrit Code Review
Charlie Edward authored and Gerrit Code Review committed Jan 17, 2013
2 parents b70a5f1 + 23aa2b0 commit ab03bbc51a0d1a573740971c69668213d3a0e2c5
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/connectors/hybi/wsprocessor.js
@@ -11,10 +11,10 @@ var ST_CLOSED = 2;
*/
var Processor = function() {
EventEmitter.call(this);
this.mockServer = new HttpServer();
this.httpServer = new HttpServer();
var self = this;
this.wsServer = new WebSocketServer({server: this.mockServer});
this.wsServer = new WebSocketServer({server: this.httpServer});
this.wsServer.on('connection', function(socket) {
// emit socket to outside
@@ -31,7 +31,7 @@ Processor.prototype.add = function(socket, data) {
if(this.state !== ST_STARTED) {
return;
}
this.mockServer.emit('connection', socket);
this.httpServer.emit('connection', socket);
socket.emit('data', data);
};
@@ -42,5 +42,5 @@ Processor.prototype.close = function() {
this.state = ST_CLOSED;
this.wsServer.close();
this.wsServer = null;
this.mockServer = null;
this.httpServer = null;
};

0 comments on commit ab03bbc

Please sign in to comment.