[Mod]修改vnokex的断线重连逻辑

This commit is contained in:
vn.py 2018-06-05 14:25:35 +08:00
parent c578d4e04d
commit 98dcecb470

View File

@ -1,15 +1,10 @@
# encoding: UTF-8
'''
OKEX的高性能异步交易API
Contributoripqhjjybj 大佳
'''
from __future__ import print_function
import hashlib
import json
import traceback
from threading import Thread
from time import sleep
@ -104,10 +99,11 @@ class OkexApi(object):
try:
self.ws.send(j)
except websocket.WebSocketConnectionClosedException:
except:
msg = traceback.format_exc()
self.onError(msg)
self.reconnect()
#----------------------------------------------------------------------
def reconnect(self):
"""重新连接"""