Skip to content

Commit b34f54c

Browse files
authored
Fix auto forward cache (microsoft#185997)
1 parent 06197f0 commit b34f54c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vs/workbench/services/remote/common/remoteExplorerService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ export class TunnelModel extends Disposable {
743743
async close(host: string, port: number, reason: TunnelCloseReason): Promise<void> {
744744
const key = makeAddress(host, port);
745745
const oldTunnel = this.forwarded.get(key)!;
746-
if (reason === TunnelCloseReason.AutoForwardEnd) {
746+
if ((reason === TunnelCloseReason.AutoForwardEnd) && oldTunnel && (oldTunnel.source.source === TunnelSource.Auto)) {
747747
this.sessionCachedProperties.set(key, {
748748
local: oldTunnel.localPort,
749749
name: oldTunnel.name,

0 commit comments

Comments
 (0)