-
Notifications
You must be signed in to change notification settings - Fork 662
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
Panic on Calling Drain on a nil NATS Connection #1562
Comments
Thanks for the issue and the PR! However, I think it's user responsibility to check error on Unless you found a scenario, that |
Thank you for your reply! Correct, however, there's a similar code for |
Observed behavior
When Drain is called on a NATS connection object and it is nil, the program panics; while calling Drain on a Subscription does not lead to a panic and returns error.
Expected behavior
I expect that calling Drain() on a NATS connection, an error be returned, instead of panic.
Server and client version
v1.32.0
Host environment
No response
Steps to reproduce
Create a NATS connection with an invalid URL, and the call Drain() on it.
The text was updated successfully, but these errors were encountered: