Skip to content

Commit 636dbcf

Browse files
authored
Revert "cli: fix error starting remote tunnels (microsoft#185701)" (microsoft#185731)
This reverts commit ffe64da.
1 parent dcd6209 commit 636dbcf

File tree

3 files changed

+6
-31
lines changed

3 files changed

+6
-31
lines changed

build/gulpfile.vscode.win32.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ function buildWin32Setup(arch, target) {
101101
AppMutex: product.win32MutexName,
102102
TunnelMutex: product.win32TunnelMutex,
103103
TunnelServiceMutex: product.win32TunnelServiceMutex,
104-
TunnelApplicationName: product.tunnelApplicationName,
105104
ApplicationName: product.applicationName,
106105
Arch: arch,
107106
AppId: { 'ia32': ia32AppId, 'x64': x64AppId, 'arm64': arm64AppId }[arch],

build/win32/code.iss

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ begin
13621362
end;
13631363
end;
13641364
1365-
if IsNotBackgroundUpdate() and not StopTunnelProcesses() then
1365+
if IsNotBackgroundUpdate() and CheckForMutexes('{#TunnelMutex}') then
13661366
begin
13671367
MsgBox('{#NameShort} is still running a tunnel. Please stop the tunnel before installing.', mbInformation, MB_OK);
13681368
Result := false
@@ -1380,30 +1380,6 @@ end;
13801380
var
13811381
ShouldRestartTunnelService: Boolean;
13821382
1383-
function StopTunnelProcesses();
1384-
var
1385-
WaitCounter: Integer;
1386-
TaskKilled: Integer;
1387-
begin
1388-
Log('Stopping all tunnel services with taskkill');
1389-
Exec('taskkill.exe', '/f /im "' + ExpandConstant('"{app}\bin\{#TunnelApplicationName}.exe"') + '"', '', SW_HIDE, ewWaitUntilTerminated, TaskKilled);
1390-
1391-
WaitCounter := 10;
1392-
while (WaitCounter > 0) and CheckForMutexes('{#TunnelMutex}') do
1393-
begin
1394-
Log('Tunnel process is is still running, waiting');
1395-
Sleep(500);
1396-
WaitCounter := WaitCounter - 1
1397-
end;
1398-
1399-
if CheckForMutexes('{#TunnelMutex}') then
1400-
Log('Unable to stop tunnel processes')
1401-
exit(False)
1402-
else
1403-
exit(True)
1404-
end
1405-
end;
1406-
14071383
procedure StopTunnelServiceIfNeeded();
14081384
var
14091385
StopServiceResultCode: Integer;
@@ -1631,4 +1607,4 @@ begin
16311607
#endif
16321608
16331609
Exec(ExpandConstant('{sys}\icacls.exe'), ExpandConstant('"{app}" /inheritancelevel:r ') + Permissions, '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
1634-
end;
1610+
end;

src/vs/platform/remoteTunnel/node/remoteTunnelService.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,13 +340,13 @@ export class RemoteTunnelService extends Disposable implements IRemoteTunnelServ
340340
}
341341
});
342342
if (!this.environmentService.isBuilt) {
343-
onOutput('Building tunnel CLI from sources and run\n', false);
344-
onOutput(`${logLabel} Spawning: cargo run -- tunnel ${commandArgs.join(' ')}\n`, false);
343+
onOutput('Building tunnel CLI from sources and run', false);
344+
onOutput(`${logLabel} Spawning: cargo run -- tunnel ${commandArgs.join(' ')}`, false);
345345
tunnelProcess = spawn('cargo', ['run', '--', 'tunnel', ...commandArgs], { cwd: join(this.environmentService.appRoot, 'cli'), stdio });
346346
} else {
347-
onOutput('Running tunnel CLI\n', false);
347+
onOutput('Running tunnel CLI', false);
348348
const tunnelCommand = this.getTunnelCommandLocation();
349-
onOutput(`${logLabel} Spawning: ${tunnelCommand} tunnel ${commandArgs.join(' ')}\n`, false);
349+
onOutput(`${logLabel} Spawning: ${tunnelCommand} tunnel ${commandArgs.join(' ')}`, false);
350350
tunnelProcess = spawn(tunnelCommand, ['tunnel', ...commandArgs], { cwd: homedir(), stdio });
351351
}
352352

0 commit comments

Comments
 (0)