From a55d312076693133ec7ae419831f54dd7fcd6bd7 Mon Sep 17 00:00:00 2001 From: supechicken Date: Wed, 1 Mar 2023 04:20:00 +0800 Subject: [PATCH] [downloader] Fix error (#8016) * downloader: Fix error * Update downloader.rb --- lib/downloader.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/downloader.rb b/lib/downloader.rb index e211b07ca..229d2b3d6 100644 --- a/lib/downloader.rb +++ b/lib/downloader.rb @@ -135,11 +135,11 @@ def http_downloader(uri, filename = File.basename(url), verbose = false) io.write(chunk) # write to file end + ensure + # stop progress bar, wait for it to terminate + progress_bar.progress_bar_showing = false + progress_bar_thread.join end - ensure - # stop progress bar, wait for it to terminate - progress_bar.progress_bar_showing = false - progress_bar_thread.join end end rescue OpenSSL::SSL::SSLError