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

sleeps for reconnectTimeWait on every reconnect. this differs from other clients #319

Closed
matthiashanel opened this issue Jan 29, 2020 · 0 comments · Fixed by #328
Closed
Assignees

Comments

@matthiashanel
Copy link

Other clients look at time since last connect attempt to decide wether to delay or not.

nats.js/lib/nats.js

Lines 2188 to 2195 in 54d7e73

// Only stall if we have connected before.
let wait = 0
if (this.servers[0].didConnect === true) {
wait = this.options.reconnectTimeWait
}
setTimeout(() => {
this.reconnect()
}, wait)

aricart added a commit that referenced this issue Feb 11, 2020
… from other clients

FIX #318 reconnect behaviour only tries maxReconnects, rather than maxReconnects per server
Removed unreferenced variable 'server' from client
Removed unreferenced callback variables
aricart added a commit that referenced this issue Feb 11, 2020
…ch other clients. (#328)

- FIX #319 sleeps for reconnectTimeWait on every reconnect this differs from other clients
- FIX #318 reconnect behaviour only tries maxReconnects, rather than maxReconnects per server
Removed unreferenced variable 'server' from client
Removed unreferenced callback variables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants