forwarding: fix tearing down process too early (#190081)

This commit is contained in:
Connor Peet 2023-08-09 12:24:56 -07:00 committed by GitHub
parent 1094b5d065
commit a0e56dcea7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -276,7 +276,11 @@ class TunnelProvider implements vscode.TunnelProvider {
try {
const l: { port_format: string } = JSON.parse(line);
if (l.port_format && l.port_format !== lastPortFormat) {
this.state = { state: State.Active, portFormat: l.port_format, process };
this.state = {
state: State.Active,
portFormat: l.port_format, process,
cleanupTimeout: 'cleanupTimeout' in this.state ? this.state.cleanupTimeout : undefined,
};
progressP.complete();
}
} catch (e) {