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

resolve NRE with AmpqConnection #1891

Merged
merged 2 commits into from Mar 27, 2024

Conversation

Aaronontheweb
Copy link
Member

@Aaronontheweb Aaronontheweb commented Mar 23, 2024

Changes

close #1659 - a simple null check is all that was required here.

Checklist

For significant changes, please ensure that the following have been completed (delete if not relevant):

@Aaronontheweb Aaronontheweb added the rabbitmq Issues affecting RabbitMQ / AMQP connectors label Mar 23, 2024
Copy link
Member Author

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is a 1-liner.

.Select(pair => new AmqpTcpEndpoint(pair.host, pair.port, details.Ssl)).ToList());
.Select(pair =>
details.Ssl == null
? new AmqpTcpEndpoint(pair.host, pair.port)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used a ternary operator to determine if we have SSL settings or not - use the appropriate CTOR depending.

@Aaronontheweb
Copy link
Member Author

I would like to have some real test coverage here - working on that via #1890

@Aaronontheweb Aaronontheweb merged commit 788d277 into akkadotnet:dev Mar 27, 2024
2 of 4 checks passed
@Aaronontheweb Aaronontheweb deleted the rabbitmq-fix-1659 branch March 27, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rabbitmq Issues affecting RabbitMQ / AMQP connectors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NullReferenceException - when using Akka.Net v1.5.12 and Akka.Streams.Amqp.RabbitMq v1.5.8
1 participant