From d9a2e1d7cfa1abe7e0b7407b15e5bfa92b994acf Mon Sep 17 00:00:00 2001 From: meaku Date: Tue, 15 Jul 2014 16:01:29 +0200 Subject: [PATCH] Remove auto initialize of socket.io as it's error prone --- lib/client/Client.class.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/client/Client.class.js b/lib/client/Client.class.js index 2312541..e204307 100644 --- a/lib/client/Client.class.js +++ b/lib/client/Client.class.js @@ -193,9 +193,10 @@ var Client = Base.extend("Client", { this.bootstrap(); } - if (config.use && config.use.websockets && this.socket === null) { - initDefaultSocket(this); + if(!this.socket && config.use && config.use.websockets) { + throw new Error("Please provide a socket.io instance or disable websockets"); } + request.socket = this.socket; if (!mainPage) {