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

[FIXED] Reconnecting to implicit URL would not use known user info #603

Merged
merged 1 commit into from
Oct 10, 2022

Conversation

kozlovic
Copy link
Member

If the user provides an URL with a username and password but the library discovers new servers and a disconnect occurs, the library would reconnect without the username and password. The option natsOptions_SetUserInfo() is normally recommended to solve this issue.

However, to be closer to other client libraries, this library will now save the username/password of an explicit URL and use those for implicit URLs (unless the aforementioned option is used).

Signed-off-by: Ivan Kozlovic ivan@synadia.com

If the user provides an URL with a username and password but
the library discovers new servers and a disconnect occurs, the
library would reconnect without the username and password.
The option `natsOptions_SetUserInfo()` is normally recommended
to solve this issue.

However, to be closer to other client libraries, this library
will now save the username/password of an explicit URL and
use those for implicit URLs (unless the aforementioned option
is used).

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kozlovic kozlovic merged commit b27cf1e into main Oct 10, 2022
@kozlovic kozlovic deleted the fix_user_reconnect branch October 10, 2022 14:51
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 this pull request may close these issues.

None yet

2 participants