修复okcoin接口无法关闭的bug
This commit is contained in:
parent
9e789af8b8
commit
4d80596462
@ -169,7 +169,7 @@ class OkCoinApi(object):
|
|||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
def close(self):
|
def close(self):
|
||||||
"""关闭接口"""
|
"""关闭接口"""
|
||||||
if self.thread.isAlive:
|
if self.thread and self.thread.isAlive:
|
||||||
self.ws.close()
|
self.ws.close()
|
||||||
self.thread.join()
|
self.thread.join()
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ class OkCoinApi(object):
|
|||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
def close(self):
|
def close(self):
|
||||||
"""关闭接口"""
|
"""关闭接口"""
|
||||||
if self.thread.isAlive:
|
if self.thread and self.thread.isAlive:
|
||||||
self.ws.close()
|
self.ws.close()
|
||||||
self.thread.join()
|
self.thread.join()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user