Skip to content

Commit

Permalink
wait longer
Browse files Browse the repository at this point in the history
  • Loading branch information
seeM committed Apr 9, 2024
1 parent f617785 commit 7f0e7c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions extensions/jupyter-adapter/src/JupyterKernel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,12 @@ export class JupyterKernel extends EventEmitter implements vscode.Disposable {
this.log(`Connecting to kernel sockets defined in ${session.state.connectionFile}...`);

// Wait for the sockets to connect or the timeout to expire. Note that
// each socket has 15 second timeout for connecting, so this is just an
// each socket has 20 second timeout for connecting, so this is just an
// additional safeguard.
await withTimeout(
this.connect(session.state.connectionFile),
20000,
`Timed out waiting 20 seconds for kernel to connect to sockets`);
25000,
`Timed out waiting 25 seconds for kernel to connect to sockets`);

// We're connected! Establish the socket listeners
return this.establishSocketListeners();
Expand Down
8 changes: 4 additions & 4 deletions extensions/jupyter-adapter/src/JupyterSocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,10 @@ export class JupyterSocket implements vscode.Disposable {
}
// Compute how long we've been waiting
const waitTime = Date.now() - startTime;
if (waitTime >= 15000) {
// If we've been waiting for more than 10 seconds, reject the promise
this._logger(`${this._title} socket connect timed out after 15 seconds`);
this._connectPromise.reject(new Error('Socket connect timed out after 15 seconds'));
if (waitTime >= 20000) {
// If we've been waiting for more than 20 seconds, reject the promise
this._logger(`${this._title} socket connect timed out after 20 seconds`);
this._connectPromise.reject(new Error('Socket connect timed out after 20 seconds'));
this._connectPromise = undefined;

// Return to the uninitialized state so a new connection can be attempted if
Expand Down

0 comments on commit 7f0e7c8

Please sign in to comment.