Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with connect after disconnect #21

Closed
bachwehbi opened this issue Jan 16, 2016 · 0 comments
Closed

Problem with connect after disconnect #21

bachwehbi opened this issue Jan 16, 2016 · 0 comments
Assignees
Labels

Comments

@bachwehbi
Copy link
Member

Calling connect after disconnect will not make the socket to connect again.

When disconnectis called, the client is not usable anymore.

// with transport set to Socket.io
var client = new bbt.Stream(opts)
client.on('connected', function() {
  console.log('Client connected')
}).on('reconnected', function() {
  console.log('Client reconnected')
}).on('disconnected', function() {
  console.log('Client disconnected')
}).

//Wait some time
client.disconnect()

//Wait some time
client.connect()

Output:

Client connected
Client disconnected

Client will not emit the reconnected event.

@bachwehbi bachwehbi self-assigned this Jan 17, 2016
@bachwehbi bachwehbi added the bug label Jan 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant