-
Notifications
You must be signed in to change notification settings - Fork 705
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
[FIXED] Call ConnectedCB with RetryOnFailedConnect when initial conn failed #1619
Conversation
8d178b4
to
f6b111e
Compare
I don't think its a breaking change, sure people can depend on this behaviour but it is clearly wrong, so I think its ok to fix the bug imo. |
5e773e7
to
fd21d11
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one fmt leftover.
nats.go
Outdated
if nc.Opts.ReconnectedCB != nil && !nc.initc { | ||
nc.ach.push(func() { nc.Opts.ReconnectedCB(nc) }) | ||
} else if nc.Opts.ConnectedCB != nil && nc.initc { | ||
fmt.Println() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A leftover after tests?
…failed Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
fd21d11
to
23902b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…failed (#1619) Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
…failed (#1619) Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
…failed (#1619) Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
…failed (#1619) Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
This fixes an issue when
ConnectedCB
is not called when using RetryOnFailedConnect and the first attempt to connect fails but subsequent retry is successful.Previously
ReconnectedCB
was invoked in such case.Signed-off-by: Piotr Piotrowski piotr@synadia.com