web socket stops every 2mins

keshav_
with code

Connection error: 1006 - connection was closed uncleanly (None)
Connection closed: 1006 - connection was closed uncleanly (None)
1006 connection was closed uncleanly (None)

I am using python kiteconnect
  • keshav_
    Also get this error when I try to reconnect

    Traceback (most recent call last):
    File "", line 1, in
    File "/usr/local/lib/python3.7/site-packages/kiteconnect-3.7.4-py3.7.egg/kiteconnect/ticker.py", line 532, in connect
    File "/usr/local/lib/python3.7/site-packages/twisted/internet/base.py", line 1266, in run
    self.startRunning(installSignalHandlers=installSignalHandlers)
    File "/usr/local/lib/python3.7/site-packages/twisted/internet/base.py", line 1246, in startRunning
    ReactorBase.startRunning(self)
    File "/usr/local/lib/python3.7/site-packages/twisted/internet/base.py", line 754, in startRunning
    raise error.ReactorNotRestartable()
    twisted.internet.error.ReactorNotRestartable
  • rakeshr
    @keshav_
    Have a look to this thread.
    If still not resolved, paste your code here.
  • keshav_
    I removed the ws.stop() from on_close method is that the right way? Now it seems to reconnect when it looses the connection
  • rakeshr
    @keshav_
    Yeah, it's fine.Try to dig reason for so frequent disconnection.
Sign In or Register to comment.