You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Calling Stop() on Initiator blocks on Dial method #653
When calling Start() and then Stop() on the initiator with a connection that is failing or timing out, sending a SIGTERM prevents the program from exiting because of the call to Dial in handleConnection.
Reducing the SocketTimeout to a lower value mitigates this issue, since the call to Dial will exit early and then exit when checking on the stopChan in waitForReconnectInterval. However this is not a clean solution and prevents flexibility from consumers of the library to be able to stop the connect process immediately.
The reason why is that the handleConnection method is taking in a proxy.Dialer which doesn't contain a dialer.DialContext method required to cancel the connection mid-way with a cancellation signal.
As a solution, we can cast the proxy.Dialer to a proxy.ContextDialer and let the call to Stop() properly exit the connection process with the use of a context on handleConnection.
Activity
Rebase clearstreet quickfix to v0.9.10 (#9)