Skip to content

Commit 1a505d6

Browse files
committed
Closes #24359
1 parent 054e682 commit 1a505d6

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/client/repl/nativeRepl.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ export class NativeRepl implements Disposable {
7474
this.notebookDocument = undefined;
7575
this.newReplSession = true;
7676
await updateWorkspaceStateValue<string | undefined>(NATIVE_REPL_URI_MEMENTO, undefined);
77+
this.pythonServer.dispose();
78+
this.pythonServer = createPythonServer([this.interpreter.path as string], this.cwd);
79+
if (this.replController) {
80+
this.replController.dispose();
81+
}
82+
nativeRepl = undefined;
7783
}
7884
}),
7985
);

src/client/repl/pythonServer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ class PythonServerImpl implements PythonServer, Disposable {
104104
this.connection.sendNotification('exit');
105105
this.disposables.forEach((d) => d.dispose());
106106
this.connection.dispose();
107+
serverInstance = undefined;
107108
}
108109
}
109110

0 commit comments

Comments
 (0)