Context is cancelled and go routine is running in the background indefinitely. Log printed every 5 seconds with message Error connecting to SignalFlow websocket: could not connect Signalflow websocket: dial tcp: operation was canceled
There is now way to close this go routine outside the Client.
According to documentation after
Client.Close()
is invoked, client should not be used anymore. This behavior is desired.The problem is when connection is not ready and
Client.Close()
is invoked, context is canceled but reconnect tries indefinitely connect to the server without checking context status. There is no way to stop go routine.Steps to reproduce:
client.Close()
.Expected result:
Actual result:
Error connecting to SignalFlow websocket: could not connect Signalflow websocket: dial tcp: operation was canceled