From ebcb1676eaa3b5880ea87e90cf8670b14c2d2f39 Mon Sep 17 00:00:00 2001 From: msincenselee Date: Mon, 1 Nov 2021 15:16:20 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E6=94=B9=E8=BF=9B=E5=A4=A9=E5=8B=A4?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E6=AD=A3=E5=B8=B8=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy/gateway/ctp/ctp_gateway.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vnpy/gateway/ctp/ctp_gateway.py b/vnpy/gateway/ctp/ctp_gateway.py index f48f62cd..12955c1b 100644 --- a/vnpy/gateway/ctp/ctp_gateway.py +++ b/vnpy/gateway/ctp/ctp_gateway.py @@ -2312,9 +2312,10 @@ class TqMdApi(): """""" try: if self.api: - self.api.close() self.is_connected = False if self.update_thread: self.update_thread.join() + self.api.close() + except Exception as e: self.gateway.write_log('退出天勤行情api异常:{}'.format(str(e)),on_log=True)