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

AutorecoveringConnection doesn't use provided hostnames on init #153

Closed
khaale opened this issue Jan 18, 2016 · 3 comments
Closed

AutorecoveringConnection doesn't use provided hostnames on init #153

khaale opened this issue Jan 18, 2016 · 3 comments
Assignees
Milestone

Comments

@khaale
Copy link

khaale commented Jan 18, 2016

Hi RabbitMQ team,

Currently 3.6 .NET client has an issue with AutorecoveringConnection initialization - it always tries to connect to the host provided in connection factory, provided hostnames list is just ignored.

Looks like the issue caused by unused hostname at https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/master/projects/client/RabbitMQ.Client/src/client/impl/AutorecoveringConnection.cs#L577

        protected void Init(string hostname)
        {
            m_delegate = new Connection(m_factory, false, m_factory.CreateFrameHandler());

I suppose it should be used like

        protected void Init(string hostname)
        {
            m_delegate = new Connection(m_factory, false, m_factory.CreateFrameHandler(m_factory.Endpoint.CloneWithHostname(hostname)));

Regards, Alex K.

@michaelklishin
Copy link
Member

Fixed directly in stable. @khaale I'm happy to provide a one-off build (a .dll) if you'd be interested in helping us test the change.

@khaale
Copy link
Author

khaale commented Jan 28, 2016

Thanks @michaelklishin ! I'd be happy to help with testing.

@michaelklishin
Copy link
Member

@khaale can you shoot me an email (michael in the RabbitMQ domain)? I'll respond with a build from the tip of stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants