|
|
@ -91,11 +91,7 @@ export class DecisionApi implements Api { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getSocketStatus(): boolean { |
|
|
|
getSocketStatus(): boolean { |
|
|
|
if (Dec) { |
|
|
|
return !!Dec?.socket?.connected; |
|
|
|
return Dec.socket.connected; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
isDriverError(errorCode: string) { |
|
|
|
isDriverError(errorCode: string) { |
|
|
@ -122,7 +118,7 @@ export class DecisionApi implements Api { |
|
|
|
|
|
|
|
|
|
|
|
private sendEditStatusEvent(name: string, type: string): Promise<SocketResult> { |
|
|
|
private sendEditStatusEvent(name: string, type: string): Promise<SocketResult> { |
|
|
|
return new Promise(resolve => { |
|
|
|
return new Promise(resolve => { |
|
|
|
if (Dec && Dec.socket.connected) { |
|
|
|
if (Dec?.socket?.connected) { |
|
|
|
Dec.socketEmit(type, BI.encode(name), (re: any) => { |
|
|
|
Dec.socketEmit(type, BI.encode(name), (re: any) => { |
|
|
|
resolve(re); |
|
|
|
resolve(re); |
|
|
|
}); |
|
|
|
}); |
|
|
|