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

update to handle null messages in FailNoServer method #2723

Closed
wants to merge 1 commit into from

Conversation

halilkocaoz
Copy link

@halilkocaoz halilkocaoz commented May 22, 2024

After this exception:

System.NullReferenceException: Object reference not set to an instance of an object.
at StackExchange.Redis.RedisBatch.FailNoServer(ConnectionMultiplexer muxer, List`1 messages) in //src/StackExchange.Redis/RedisBatch.cs:line 120
at StackExchange.Redis.RedisBatch.Execute() in /
/src/StackExchange.Redis/RedisBatch.cs:line 30

I was able to have a look at the code and found this:
(messages == null) expression is always false because of the nullable annotation.

@NickCraver
Copy link
Collaborator

Thanks for the report! I don't think what you're seeing is caused or helped by this though, this implies we have a null message in the list or an inlined call is failing with a misleading line number e.g. on the .Fail call.

Is this happening while your ConnectionMultiplexer is being disposed by chance?

@halilkocaoz
Copy link
Author

Thanks for the report! I don't think what you're seeing is caused or helped by this though, this implies we have a null message in the list or an inlined call is failing with a misleading line number e.g. on the .Fail call.

Is this happening while your ConnectionMultiplexer is being disposed by chance?

I don't think, but I will reproduce it and inform again

@halilkocaoz
Copy link
Author

Thanks for the report! I don't think what you're seeing is caused or helped by this though, this implies we have a null message in the list or an inlined call is failing with a misleading line number e.g. on the .Fail call.
Is this happening while your ConnectionMultiplexer is being disposed by chance?

I don't think, but I will reproduce it and inform again

I could not reproduce the situation, if the messages are null, I saw that it got a null exception without entering the iteration. The problem may not be related to this situation. I can re-evaluate and maybe try to explain the situation with the issue, thanks.

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.

2 participants