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:
parent
f695062ec4
commit
de9e814305
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ const ModalTerminal = ({
|
|||
setIsDisable(true);
|
||||
setTimeout(() => {
|
||||
setIsDisable(false);
|
||||
}, 5000);
|
||||
}, 10000);
|
||||
};
|
||||
|
||||
const findSwitchPort = (portName: string): SwitchPortsProps | null => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue