Skip to content

Commit 2771b4b

Browse files
committed
deleting this incorrect return statement in terminal "connect" should fix a "terminal hang" bug we've had for a few weeks
- there's a bug for sure and this definitely would cause it, so hopefully it is the fix
1 parent ecbe95f commit 2771b4b

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/packages/frontend/frame-editors/terminal-editor/connected-terminal.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ export class Terminal<T extends CodeEditorState = CodeEditorState> {
118118
workingDir?: string,
119119
) {
120120
this.actions = actions;
121-
this.ask_for_cwd = debounce(this.ask_for_cwd);
122121

123122
this.account_store = redux.getStore("account");
124123
this.project_actions = redux.getProjectActions(actions.project_id);
@@ -289,9 +288,9 @@ export class Terminal<T extends CodeEditorState = CodeEditorState> {
289288
try {
290289
await this.configureComputeServerId();
291290
} catch {
292-
// expected if the project tab closes right when the terminal is
293-
// being created.
294-
return;
291+
// expected to throw sometimes, e.g., if the project tab closes
292+
// right when the terminal is being created, in which case this.state
293+
// will be closed and we exit.
295294
}
296295
if (this.state == "closed") {
297296
return;
@@ -721,9 +720,9 @@ export class Terminal<T extends CodeEditorState = CodeEditorState> {
721720
this.render_buffer = "";
722721
};
723722

724-
ask_for_cwd = (): void => {
723+
ask_for_cwd = debounce((): void => {
725724
this.conn_write({ cmd: "cwd" });
726-
};
725+
});
727726

728727
kick_other_users_out(): void {
729728
// @ts-ignore

src/packages/util/smc-version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
/* autogenerated by the update_version script */
2-
exports.version=1751812672;
2+
exports.version=1751843875;

0 commit comments

Comments
 (0)