Notebooks: More Jupyter Server Hardening (#5264)

* Do not rely on same starting port every time, misc

* put back to 5 seconds for process kill timeout

* extHostNotebook shutdown manager handle
This commit is contained in:
Chris LaFreniere
2019-04-30 14:13:04 -07:00
committed by GitHub
parent 0f12d15020
commit e72d0d03ed
4 changed files with 13 additions and 8 deletions

View File

@@ -117,6 +117,10 @@ export class ExtHostNotebook implements ExtHostNotebookShape {
}
$shutdownSession(managerHandle: number, sessionId: string): Thenable<void> {
// If manager handle has already been removed, don't try to access it again when shutting down
if (this._adapters.get(managerHandle) === undefined) {
return undefined;
}
return this._withSessionManager(managerHandle, async (sessionManager) => {
return sessionManager.shutdown(sessionId);
});