Adjust connection and UI timeout durations

Reduced sleep delay in socket reconnection logic and increased disable timeout in ModalTerminal from 5s to 10s. These changes aim to improve responsiveness and user experience during connection and UI interactions.
This commit is contained in:
nguyentrungthat 2025-11-22 10:11:44 +07:00
parent f695062ec4
commit de9e814305
2 changed files with 3 additions and 3 deletions

View File

@ -565,7 +565,7 @@ export class WebSocketIo {
if (line && line.config.status === 'connected') {
this.lineConnecting = this.lineConnecting.filter((el) => el !== lineId)
this.setTimeoutConnect(lineId, line, options.timeout)
await sleep(500)
// await sleep(500)
await action(line, options)
} else {
if (this.lineConnecting.includes(lineId)) continue
@ -587,7 +587,7 @@ export class WebSocketIo {
const lineReconnect = this.lineMap.get(lineId)
if (lineReconnect) {
this.setTimeoutConnect(lineId, lineReconnect, options.timeout)
await sleep(500)
await sleep(100)
await action(lineReconnect, options)
}
} else {

View File

@ -342,7 +342,7 @@ const ModalTerminal = ({
setIsDisable(true);
setTimeout(() => {
setIsDisable(false);
}, 5000);
}, 10000);
};
const findSwitchPort = (portName: string): SwitchPortsProps | null => {