When the binding receives an ErrorResponse from the server during the authentication phase, it will attempt to reconnect. The issue with this is that the ConnectAsync method is gated with a single permit semaphore which causes a deadlock in the following:
Summary
When the binding receives an
ErrorResponse
from the server during the authentication phase, it will attempt to reconnect. The issue with this is that theConnectAsync
method is gated with a single permit semaphore which causes a deadlock in the following:This PR fixes this by controlling the reconnect logic in the
ConnectAsync
method rather than its dependents.Fixes #39