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] natsConnection_RequestMsg() incorrectly returns NATS_NO_SERVER_SUPPORT #645

Merged
merged 3 commits into from
Mar 9, 2023

Conversation

kozlovic
Copy link
Member

@kozlovic kozlovic commented Mar 9, 2023

When using natsOptions_SetRetryOnFailedConnect option to connect and the library is not yet connected, calling natsConnection_RequestMsg with a message with headers would incorrectly return NATS_NO_SERVER_SUPPORT instead of NATS_TIMEOUT.

Resolves #644

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

@kozlovic kozlovic requested a review from levb March 9, 2023 00:38
@@ -104,7 +104,7 @@ natsConn_publish(natsConnection *nc, natsMsg *msg, const char *reply, bool direc
// accessing the headers. It should still be considered having headers.
if ((msg->headers != NULL) || natsMsg_needsLift(msg))
{
if (!nc->info.headers)
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: 0/5 update the comment with the comment from this PR to explain why initc is excluded?

…R_SUPPORT

When using `natsOptions_SetRetryOnFailedConnect` option to connect
and the library is not yet connected, calling `natsConnection_RequestMsg`
with a message with headers would incorrectly return `NATS_NO_SERVER_SUPPORT`
instead of `NATS_TIMEOUT`.

Resolves #644

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@kozlovic kozlovic merged commit 7b36d52 into main Mar 9, 2023
@kozlovic kozlovic deleted the fix_644 branch March 9, 2023 22:56
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.

natsConnection_RequestMsg returns NATS_NO_SERVER_SUPPORT instead of NATS_TIMEOUT when there is no connection
2 participants