From bd92a827e1f735554f6ef8ba05deb1cede3b22a8 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Fri, 18 Mar 2016 15:55:07 -0700 Subject: [PATCH] fix: reference error --- server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server.js b/server.js index 9851bd5..a6cf5e4 100644 --- a/server.js +++ b/server.js @@ -303,13 +303,13 @@ Server.prototype.onWebSocketConnection = function (socket, opts) { socket.onSend = self._onWebSocketSend.bind(self, socket) socket.onMessageBound = self._onWebSocketRequest.bind(self, socket, opts) - socket.on('message', self.onMessageBound) + socket.on('message', socket.onMessageBound) socket.onErrorBound = self._onWebSocketError.bind(self, socket) - socket.on('error', self.onErrorBound) + socket.on('error', socket.onErrorBound) socket.onCloseBound = self._onWebSocketClose.bind(self, socket) - socket.on('close', self.onCloseBound) + socket.on('close', socket.onCloseBound) } Server.prototype._onWebSocketRequest = function (socket, opts, params) {