Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
fix: show terminal close reason
Browse files Browse the repository at this point in the history
  • Loading branch information
hibig committed Mar 6, 2024
1 parent 71a5388 commit 040e825
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/x-terminal/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
command.value = '';
};
const closeRealTerminal = (data) => {
statusCode.value = get(data, 'code');
conReadyState.value = terminalSocket.value.readyState;
clearCommand();
if ([1011, 1006, 1000].includes(statusCode.value)) {
Expand All @@ -103,6 +102,8 @@
term.value.write(setErrorData(`\r${RECONNECT_MSG}`));
}
first.value = true;
} else if (data.reason) {
term.value.write(setData(`${data.reason}\r\n`));
}
loading.value = false;
};
Expand Down Expand Up @@ -317,7 +318,7 @@
clearTimeout(timer);
timer = setTimeout(() => {
retryWs();
}, 2 ** (totalRetry - retryCount.value) * 1000);
}, 2000);
}
},
{
Expand Down

0 comments on commit 040e825

Please sign in to comment.