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

Signature callback does not know the server URL #635

Closed
Kazmirchuk opened this issue Feb 2, 2023 · 0 comments · Fixed by #636
Closed

Signature callback does not know the server URL #635

Kazmirchuk opened this issue Feb 2, 2023 · 0 comments · Fixed by #636

Comments

@Kazmirchuk
Copy link

Hi,
I'm using natsOptions_SetNKey and my custom callback to extract a NKey seed from a secure storage (e.g. Windows credential manager or KWallet). However, in case I have multiple NATS servers, I don't know with which one I'm trying to 'shake hands', because natsConnection_GetConnectedUrl still returns NULL during my callback.

Would it be possible to make natsConnection_GetConnectedUrl return a value already after receiving INFO, while the handshake is still in progress?

Thanks in advance

kozlovic added a commit that referenced this issue Feb 8, 2023
This function, and natsConnection_GetConnectedServerId() would work
only when the connection was fully connected. There is no reason
to not make it work while the connection is reconnecting.

Resolves #635

Signed-off-by: Ivan Kozlovic <[email protected]>
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.

1 participant