I want to close a running websocket connection and then again resume the same websocket connection after 5 minutes . I am unable to use kws.close() properly. It throws an error.
I am able to subscribe and run a web socket connection but not able to break (close the connection) websocket in between and then NOT able to RESUME the same connection again.
Maybe you can add the required time delay inside on_tick method instead and give it a try.
Eg.