mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-31 20:46:24 +01:00
Fix removing tunnels when the tunnel factory throws an error (#186566)
* Await the tunnel promise * Add null check * nit: use undefined --------- Co-authored-by: Alex Ross <alros@microsoft.com>
This commit is contained in:
co-authored by
Alex Ross
parent
a3231fc857
commit
661fbc9ecf
@@ -416,7 +416,7 @@ export abstract class AbstractTunnelService implements ITunnelService {
|
||||
const hostMap = this._tunnels.get(remoteHost);
|
||||
if (hostMap) {
|
||||
const tunnel = hostMap.get(remotePort);
|
||||
const tunnelResult = await tunnel;
|
||||
const tunnelResult = tunnel ? await tunnel.value : undefined;
|
||||
if (!tunnelResult) {
|
||||
hostMap.delete(remotePort);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user