-
Notifications
You must be signed in to change notification settings - Fork 595
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
Calling Dispose on AutorecoveringModel that has already shutdown throws NullRefException #825
Comments
I still have the same issue even though I've updated RabbitMQ to 6.2.1 |
Still an issue in 6.8.1 as far as I can tell: Message:
System.NullReferenceException : Object reference not set to an instance of an object.
Stack Trace:
AutorecoveringModel.Abort()
AutorecoveringModel.Dispose(Boolean disposing)
IDisposable.Dispose()
... |
@egil |
Sorry, mistook the aspire package for this one. Fixed in my original comment. |
I've re-opened this issue, but fixes for the 6.x version of this library will probably be limited to only very serious bugs, unless a community user wishes to submit a PR. |
The workaround (try/catch) works well enough until v7 is out. |
Add test to demonstrate that #825 is fixed
Just hit this issue during testing in one our systems, where we try to restart a consumer if it has shutdown. For good measure, we decided to call .Dispose on the Model in the consumer, which threw an exception in the AutorecoveringModel.Abort() method.
Calling .Dispose should never throw an exception, as it is often called in
finally
blocks. See here: https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1065?view=vs-2019The text was updated successfully, but these errors were encountered: