diff --git a/README.md b/README.md index a88ef423e..fbe31371f 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,8 @@ Socket.IO is compatible with [browserify](http://browserify.org/). the amount specified by `reconnectionDelay`. - `timeout` connection timeout before a `connect_error` and `connect_timeout` events are emitted (`20000`) + - `autoConnect` by setting this false, you have to call `manager.open` + whenever you decide it's appropriate #### Events diff --git a/lib/manager.js b/lib/manager.js index 01aebb540..ddfa19af9 100644 --- a/lib/manager.js +++ b/lib/manager.js @@ -52,7 +52,8 @@ function Manager(uri, opts){ this.packetBuffer = []; this.encoder = new parser.Encoder(); this.decoder = new parser.Decoder(); - this.open(); + if (opts.autoConnect !== false) + this.open(); } /**