Skip to content
This repository has been archived by the owner on Jul 12, 2018. It is now read-only.

Commit

Permalink
Remove auto initialize of socket.io as it's error prone
Browse files Browse the repository at this point in the history
  • Loading branch information
meaku committed Jul 15, 2014
1 parent 469bc2a commit d9a2e1d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/client/Client.class.js
Expand Up @@ -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) {
Expand Down

0 comments on commit d9a2e1d

Please sign in to comment.