[Mod] 将WebSocketClient.init(host)函数提前到__init__中调用

This commit is contained in:
nanoric 2018-10-16 05:46:10 -04:00
parent 1cc5c8b16e
commit eb844d4b9b

View File

@ -61,13 +61,13 @@ class OkexFutureWebSocketBase(WebSocketClient):
def __init__(self):
super(OkexFutureWebSocketBase, self).__init__()
super(OkexFutureWebSocketBase, self).init(OkexFutureWebSocketBase.host)
self.apiKey = None
self.apiSecret = None
#----------------------------------------------------------------------
# noinspection PyMethodOverriding
def init(self, apiKey, secretKey):
super(OkexFutureWebSocketBase, self).init(self.host)
self.apiKey = apiKey
self.apiSecret = secretKey