Randomize the sleep before version fetch

This commit is contained in:
Kovid Goyal 2019-02-01 23:33:41 +05:30
parent 13d478ffca
commit 4c49573465
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -98,7 +98,8 @@ def process_current_release(raw):
def update_check(timer_id=None):
p = subprocess.Popen([
kitty_exe(), '+runpy', 'from kitty.update_check import *; import time; time.sleep(2); print(get_released_version())'
kitty_exe(), '+runpy',
'from kitty.update_check import *; import time, random; time.sleep(random.randint(1000, 4000) / 1000); print(get_released_version())'
], stdout=subprocess.PIPE)
monitor_pid(p.pid)
get_boss().set_update_check_process(p)