I have migrated my websocket script to kiteconnect3.0. In the earlier v2 script I used to call threaded= true. Then in the main thread I used to check the time using a while loop and at 15:30, I used to call sys.exit().
In V3 I see that you have added blanket exception handling due to which everything including a sys.exit or even a CTRL + c is being captured and the script just goes on. After 3:30 it ends up retrying connections when the ticks don't flow in a kind of a never ending loop. Yesterday I had to hit a CTRL+z and then do a "kill -9 %1"
I guess ws.stop() cannot be called from the main thread. So my query to you is this. What is your recommended way to close the websocket and terminate the script at 15:30 from the main thread. In the absence of a sandbox env, I don't want to experiment on this and end up hammering your prod servers unnecessarily.