|
@@ -1,4 +1,4 @@
|
|
|
-import { checkTokenAction, stopCheckToken } from '@/services/bus/token';
|
|
|
|
|
|
|
+import { checkTokenAction, handleTokenCheck, stopCheckToken } from '@/services/bus/token';
|
|
|
import { NeedClearSourceDataType, NoClearSourceDataType } from '@/services/dataCenter/interface';
|
|
import { NeedClearSourceDataType, NoClearSourceDataType } from '@/services/dataCenter/interface';
|
|
|
import { funCode } from '@/services/funcode/index';
|
|
import { funCode } from '@/services/funcode/index';
|
|
|
import { serviceURL } from '@/services/request/index';
|
|
import { serviceURL } from '@/services/request/index';
|
|
@@ -97,10 +97,12 @@ export default new (class LifeCycleCtr {
|
|
|
sendQuoteServer(p: Package40, rsp?: number, callback?: Callback): void {
|
|
sendQuoteServer(p: Package40, rsp?: number, callback?: Callback): void {
|
|
|
this.Socket['quote'].send(p, rsp, callback);
|
|
this.Socket['quote'].send(p, rsp, callback);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
/** 主动关闭行情服务 */
|
|
/** 主动关闭行情服务 */
|
|
|
closeQuote() {
|
|
closeQuote() {
|
|
|
this.Socket['quote'].close();
|
|
this.Socket['quote'].close();
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
/** 主动关闭长链接 */
|
|
/** 主动关闭长链接 */
|
|
|
closeServer(): void {
|
|
closeServer(): void {
|
|
|
this.Socket['trade'].close();
|
|
this.Socket['trade'].close();
|
|
@@ -193,7 +195,9 @@ export default new (class LifeCycleCtr {
|
|
|
/** 重连成功,将进行业务操作 */
|
|
/** 重连成功,将进行业务操作 */
|
|
|
case ReconnectChangeState.ReconnectSuccessed:
|
|
case ReconnectChangeState.ReconnectSuccessed:
|
|
|
// 重新启动定时 token 校验
|
|
// 重新启动定时 token 校验
|
|
|
- checkTokenAction()
|
|
|
|
|
|
|
+ handleTokenCheck().then(() => {
|
|
|
|
|
+ checkTokenAction();
|
|
|
|
|
+ })
|
|
|
console.log(obj.host, '重连成功,将进行业务操作');
|
|
console.log(obj.host, '重连成功,将进行业务操作');
|
|
|
break;
|
|
break;
|
|
|
/** 重连成功后业务操作失败并将再次重试,由业务模块发起 */
|
|
/** 重连成功后业务操作失败并将再次重试,由业务模块发起 */
|