Skip to content

Commit 661fbc9

Browse files
joshaberalexr00
andauthored
Fix removing tunnels when the tunnel factory throws an error (microsoft#186566)
* Await the tunnel promise * Add null check * nit: use undefined --------- Co-authored-by: Alex Ross <[email protected]>
1 parent a3231fc commit 661fbc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vs/platform/tunnel/common/tunnel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ export abstract class AbstractTunnelService implements ITunnelService {
416416
const hostMap = this._tunnels.get(remoteHost);
417417
if (hostMap) {
418418
const tunnel = hostMap.get(remotePort);
419-
const tunnelResult = await tunnel;
419+
const tunnelResult = tunnel ? await tunnel.value : undefined;
420420
if (!tunnelResult) {
421421
hostMap.delete(remotePort);
422422
}

0 commit comments

Comments
 (0)