Skip to content

Commit

Permalink
natsConnection_Buffered: fix returned value in case of error
Browse files Browse the repository at this point in the history
This function returns number of bytes in the buffer.
It is incorrect to return value from natsStatus enum.
  • Loading branch information
kolomenkin committed May 2, 2023
1 parent b2ac624 commit 6cb745d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -3811,7 +3811,7 @@ natsConnection_Buffered(natsConnection *nc)
int buffered = -1;

if (nc == NULL)
return nats_setDefaultError(NATS_INVALID_ARG);
return buffered;

natsConn_Lock(nc);

Expand Down

0 comments on commit 6cb745d

Please sign in to comment.