Skip to content

Commit

Permalink
add autoConnect option to wait with connecting
Browse files Browse the repository at this point in the history
  • Loading branch information
danielkcz committed Jun 1, 2014
1 parent fa60e79 commit 29cc049
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion lib/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand Down

0 comments on commit 29cc049

Please sign in to comment.