mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
Make sure we don't go into a redirect loop when using port mappings with same source and destination ports
This commit is contained in:
parent
201a9c8e41
commit
ac719087ef
|
@ -34,6 +34,9 @@ export class WebviewPortMappingManager extends Disposable {
|
|||
if (extensionLocation && extensionLocation.scheme === REMOTE_HOST_SCHEME) {
|
||||
const tunnel = await this.getOrCreateTunnel(mapping.extensionHostPort);
|
||||
if (tunnel) {
|
||||
if (tunnel.tunnelLocalPort === mapping.webviewPort) {
|
||||
return undefined;
|
||||
}
|
||||
return encodeURI(uri.with({
|
||||
authority: `127.0.0.1:${tunnel.tunnelLocalPort}`,
|
||||
}).toString(true));
|
||||
|
|
Loading…
Reference in a new issue