How to stop websocket connection once we run it
-
ss = SmartWebSocket(FEED_TOKEN, CLIENT_CODE)
def on_message(ws, message):
print("Ticks: {}".format(message))def on_open(ws):
print("on open")
ss.subscribe(task,token)def on_error(ws, error):
print(error)def on_close(ws):
print("Close")Assign the callbacks.
ss._on_open = on_open
ss._on_message = on_message
ss._on_error = on_error
ss._on_close = on_closess.connect()
lets says this is my code - for the websocket.
now how can i stop stop or terminate this websocket connection.?
-
@mukul-ietlucknow By any chance, did you find a solution for this?
-
@mukul-ietlucknow @admin please respond to the query. it is required else it runs all the time. please solve this issue