[Fix]Close #1004
This commit is contained in:
parent
1d5d7af64b
commit
db905149d6
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user