Skip to content

Commit

Permalink
Misc
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne committed May 18, 2023
1 parent 8efe654 commit 57fc09a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/kernels/jupyter/connection/jupyterConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,8 @@ export class JupyterConnection implements IExtensionSyncActivationService {
return savedList.find((item) => item.serverId === serverId)?.uri;
}
private async createConnectionInfoFromUri(uri: string) {
// Prepare our map of server URIs
await this.updateServerUri(uri);

const server = await this.updateServerUri(uri);
const idAndHandle = extractJupyterServerHandleAndId(uri);
const server = this.uriToJupyterServerUri.get(uri);
return createRemoteConnectionInfo(uri, server, idAndHandle?.id);
}

Expand All @@ -96,7 +93,7 @@ export class JupyterConnection implements IExtensionSyncActivationService {
}
}

private async updateServerUri(uri: string): Promise<void> {
private async updateServerUri(uri: string) {
const idAndHandle = extractJupyterServerHandleAndId(uri);
if (idAndHandle) {
try {
Expand All @@ -113,6 +110,7 @@ export class JupyterConnection implements IExtensionSyncActivationService {
this.pendingTimeouts.push(setTimeout(() => this.updateServerUri(uri).catch(noop), timeout));
}
}
return serverUri;
} catch (ex) {
if (ex instanceof BaseError) {
throw ex;
Expand Down

0 comments on commit 57fc09a

Please sign in to comment.