diff --git a/examples/WebTrader/run.py b/examples/WebTrader/run.py index 8ea79db6..e2e639f5 100644 --- a/examples/WebTrader/run.py +++ b/examples/WebTrader/run.py @@ -99,10 +99,8 @@ class Gateway(Resource): """查询""" args = self.parser.parse_args() token = args['token'] - print token - print TOKEN + if token != TOKEN: - print 'token error' return {'result_code':'error','message':'token error'} l = me.getAllGatewayDetails() diff --git a/vnpy/rpc/vnrpc.py b/vnpy/rpc/vnrpc.py index f8c00047..cc6d7275 100644 --- a/vnpy/rpc/vnrpc.py +++ b/vnpy/rpc/vnrpc.py @@ -298,8 +298,7 @@ class RpcClient(RpcObject): 注意topic必须是ascii编码 """ self.__socketSUB.setsockopt(zmq.SUBSCRIBE, topic) - - + ######################################################################## class RemoteException(Exception): diff --git a/vnpy/trader/app/rpcService/rsClient.py b/vnpy/trader/app/rpcService/rsClient.py index d674c76c..8d45f63f 100644 --- a/vnpy/trader/app/rpcService/rsClient.py +++ b/vnpy/trader/app/rpcService/rsClient.py @@ -107,6 +107,7 @@ class MainEngineProxy(object): #---------------------------------------------------------------------- def exit(self): - self.eventEvent.stop() + self.eventEngine.stop() + if self.client: self.client.stop()