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 7b36d52 commit 5447b28
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 5447b28

Please sign in to comment.