[Add] relogin after disconnected

This commit is contained in:
vn.py 2019-05-22 15:18:32 +08:00
parent f316c5412c
commit f30fce70bd

View File

@ -306,6 +306,8 @@ class XtpQuoteApi(API.QuoteSpi):
""""""
self.gateway.write_log("行情服务器连接断开")
self.login()
def OnError(self, error_info: XTPRspInfoStruct) -> Any:
""""""
self.check_error("行情接口", error_info)
@ -641,6 +643,8 @@ class XtpTraderApi(API.TraderSpi):
""""""
self.gateway.write_log("交易服务器连接断开")
self.login()
def OnError(self, error_info: XTPRspInfoStruct) -> Any:
""""""
self.check_error("交易接口", error_info)