Browse Source

KERNEL-15739 fix: 【服务拆分】数据连接补充下socket连接异常场景

research/11.0
Austin.Duan 8 months ago
parent
commit
680c195084
  1. 4
      src/modules/crud/decision.api.ts

4
src/modules/crud/decision.api.ts

@ -64,6 +64,10 @@ export class DecisionApi implements Api {
// TODO: 当前emit同步回调已无法执行 // TODO: 当前emit同步回调已无法执行
this.sendEditStatusEvent(name, editStatusEvent.OPEN); this.sendEditStatusEvent(name, editStatusEvent.OPEN);
if (Dec.socket?.connected) {
return Promise.resolve({ data: 'success' });
}
return new Promise((resolve, rejected) => { return new Promise((resolve, rejected) => {
this.addEventListener(editStatusEvent.OPEN, res => { this.addEventListener(editStatusEvent.OPEN, res => {
const data = JSON.parse(res.data); const data = JSON.parse(res.data);

Loading…
Cancel
Save