[Add] relogin after disconnected
This commit is contained in:
parent
f316c5412c
commit
f30fce70bd
@ -306,6 +306,8 @@ class XtpQuoteApi(API.QuoteSpi):
|
|||||||
""""""
|
""""""
|
||||||
self.gateway.write_log("行情服务器连接断开")
|
self.gateway.write_log("行情服务器连接断开")
|
||||||
|
|
||||||
|
self.login()
|
||||||
|
|
||||||
def OnError(self, error_info: XTPRspInfoStruct) -> Any:
|
def OnError(self, error_info: XTPRspInfoStruct) -> Any:
|
||||||
""""""
|
""""""
|
||||||
self.check_error("行情接口", error_info)
|
self.check_error("行情接口", error_info)
|
||||||
@ -641,6 +643,8 @@ class XtpTraderApi(API.TraderSpi):
|
|||||||
""""""
|
""""""
|
||||||
self.gateway.write_log("交易服务器连接断开")
|
self.gateway.write_log("交易服务器连接断开")
|
||||||
|
|
||||||
|
self.login()
|
||||||
|
|
||||||
def OnError(self, error_info: XTPRspInfoStruct) -> Any:
|
def OnError(self, error_info: XTPRspInfoStruct) -> Any:
|
||||||
""""""
|
""""""
|
||||||
self.check_error("交易接口", error_info)
|
self.check_error("交易接口", error_info)
|
||||||
|
Loading…
Reference in New Issue
Block a user