This commit is contained in:
vn.py 2018-08-04 22:08:21 +08:00
parent 1d5d7af64b
commit db905149d6

View File

@ -199,18 +199,14 @@ class CoinbaseWebsocketApi(object):
def run(self): def run(self):
"""运行""" """运行"""
while self.active: while self.active:
stream = self.ws.recv() try:
data = json.loads(stream) stream = self.ws.recv()
self.onData(data) data = json.loads(stream)
self.onData(data)
#try: except:
#stream = self.ws.recv() msg = traceback.format_exc()
#data = json.loads(stream) self.onError(msg)
#self.onData(data) self.reconnect()
#except:
#msg = traceback.format_exc()
#self.onError(msg)
#self.reconnect()
#---------------------------------------------------------------------- #----------------------------------------------------------------------
def close(self): def close(self):