public static async Task DownloadIfNeeded()

in src/Azure.AppService.Tunnel/Agent/DebuggerAgentDownloader.cs [16:37]


    public static async Task DownloadIfNeeded(string path, string fileName)
    {
        await Semaphore.WaitAsync();

        try
        {
            if (!IsDownloaded(path))
            {
                Logger.Info("Begin downloading debugger agent");
                await Download(path, fileName);
            }
        }
        catch (Exception exception)
        {
            Logger.Error(exception, "Failed to download debugger agent");
            throw;
        }
        finally
        {
            Semaphore.Release();
        }
    }