Tunnel factory can return undefined (#113232)

Fixes microsoft/vscode-internalbacklog#1680
This commit is contained in:
Alex Ross
2020-12-28 09:54:08 +01:00
committed by GitHub
parent 5162c8e856
commit 4804bbcdff
7 changed files with 58 additions and 24 deletions

View File

@@ -222,7 +222,7 @@ export class ExtHostTunnelService extends Disposable implements IExtHostTunnelSe
this._onDidChangeTunnels.fire();
}
$forwardPort(tunnelOptions: TunnelOptions, tunnelCreationOptions: TunnelCreationOptions): Promise<TunnelDto> | undefined {
async $forwardPort(tunnelOptions: TunnelOptions, tunnelCreationOptions: TunnelCreationOptions): Promise<TunnelDto | undefined> {
if (this._forwardPortProvider) {
const providedPort = this._forwardPortProvider(tunnelOptions, tunnelCreationOptions);
if (providedPort !== undefined) {