From a89d64dc32151344013301bd5b9159303f82f45f Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Mon, 7 May 2018 22:58:02 +0800 Subject: [PATCH] =?UTF-8?q?[Fix]Close=20#750=EF=BC=8C=E5=A2=9E=E5=8A=A0Rpc?= =?UTF-8?q?Server=E5=81=9C=E6=AD=A2=E6=97=B6=E7=9A=84join=E9=80=89?= =?UTF-8?q?=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy/rpc/vnrpc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vnpy/rpc/vnrpc.py b/vnpy/rpc/vnrpc.py index 7b533eab..2202f76b 100644 --- a/vnpy/rpc/vnrpc.py +++ b/vnpy/rpc/vnrpc.py @@ -136,13 +136,13 @@ class RpcServer(RpcObject): self.__thread.start() #---------------------------------------------------------------------- - def stop(self): + def stop(self, join=False): """停止服务器""" # 将服务器设为停止 self.__active = False # 等待工作线程退出 - if self.__thread.isAlive(): + if join and self.__thread.isAlive(): self.__thread.join() #----------------------------------------------------------------------