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

Exceptions not handled during reconnect and setting Reconnect strategy equal to null causes null reference exception #25

Open
ddslawson opened this issue Nov 7, 2019 · 0 comments

Comments

@ddslawson
Copy link

I experienced an exception being thrown during the reconnect procedure. Specifically the exception said an attempt to connect was refused because an attempt to connect was already in progress. I believe some exception handling is needed on line 225 referenced above.

if (!_strategy.AreAttemptsComplete())

To work around this I tried to disable to the reconnect strategy so I could write my own. This caused a null reference exception to be thrown after OnDisconnect on my own IBasicListener implementation was called. I believe I have identified the problem on line 120 referenced above. It seems after calling OnDisconnect it calls _strategy.AreAttemptsComplete() without first checking is _strategy is not null.

I have found a workaround for the latter problem, which is to set the max attempts of the reconnect strategy to 0.

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

No branches or pull requests

1 participant