From c42ecb6ec87af14fba2e632ee5f757980e9b8056 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Sun, 10 Jun 2018 14:59:03 +0800 Subject: [PATCH] =?UTF-8?q?[Fix]=E4=BF=AE=E5=A4=8D=E5=B8=81=E5=AE=89API?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E6=97=B6=E7=9A=84=E7=BA=BF=E7=A8=8B=E6=B1=A0?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy/api/binance/vnbinance.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vnpy/api/binance/vnbinance.py b/vnpy/api/binance/vnbinance.py index 8e9ade96..9d9decfd 100644 --- a/vnpy/api/binance/vnbinance.py +++ b/vnpy/api/binance/vnbinance.py @@ -85,8 +85,10 @@ class BinanceApi(object): def close(self): """""" self.active = False - self.pool.close() - self.pool.join() + + if self.pool: + self.pool.close() + self.pool.join() #---------------------------------------------------------------------- def request(self, method, path, params=None, signed=False, stream=False):