Skip to content
Snippets Groups Projects
Commit ef90f61b authored by Fabian Schuh's avatar Fabian Schuh
Browse files

[websocket] Fix a couple minor issues

parent a2674ede
No related branches found
No related tags found
No related merge requests found
...@@ -122,7 +122,9 @@ class BitSharesWebsocket(Events): ...@@ -122,7 +122,9 @@ class BitSharesWebsocket(Events):
self.user = user self.user = user
self.password = password self.password = password
self.keep_alive = keep_alive self.keep_alive = keep_alive
if isinstance(urls, list): if isinstance(urls, cycle):
self.urls = urls
elif isinstance(urls, list):
self.urls = cycle(urls) self.urls = cycle(urls)
else: else:
self.urls = cycle([urls]) self.urls = cycle([urls])
...@@ -191,7 +193,7 @@ class BitSharesWebsocket(Events): ...@@ -191,7 +193,7 @@ class BitSharesWebsocket(Events):
def ping(self): def ping(self):
while 1: while 1:
log.debug('Sending ping') log.debug('Sending ping')
self.get_objects(["2.9.0"]) self.get_objects(["2.8.0"])
time.sleep(self.keep_alive) time.sleep(self.keep_alive)
self.keepalive = threading.Thread( self.keepalive = threading.Thread(
...@@ -205,6 +207,7 @@ class BitSharesWebsocket(Events): ...@@ -205,6 +207,7 @@ class BitSharesWebsocket(Events):
we call ``on_object`` and ``on_account`` slots. we call ``on_object`` and ``on_account`` slots.
""" """
id = notice["id"] id = notice["id"]
_a, _b, _ = id.split(".") _a, _b, _ = id.split(".")
if id in self.subscription_objects: if id in self.subscription_objects:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment