Skip to content

Commit 46f2615

Browse files
committed
Prevent issuing terminal reload when already reloading
I am not sure this actually causes any issues, but might as well.
1 parent 78ec07b commit 46f2615

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

site/src/pages/TerminalPage/TerminalPage.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ const useReloading = (isDisconnected: boolean) => {
470470

471471
// Retry connection on key press when it is disconnected
472472
useEffect(() => {
473-
if (!isDisconnected) {
473+
if (!isDisconnected || status === "reloading") {
474474
return;
475475
}
476476

@@ -484,7 +484,7 @@ const useReloading = (isDisconnected: boolean) => {
484484
return () => {
485485
document.removeEventListener("keydown", keyDownHandler, true);
486486
};
487-
}, [isDisconnected]);
487+
}, [status, isDisconnected]);
488488

489489
return {
490490
status,

0 commit comments

Comments
 (0)