It looks like you're new here. If you want to get involved, click one of these buttons!
def on_close(ws, code, reason): # On connection close stop the main loop # Reconnection will not happen after executing `ws.stop()` ws.stop()
mentions so if you remove ws.stop() from on_close, it will reconnect