Adding a timeout of 5 seconds (while fetching the latest pgAdmin version), it

stucks at rendering the main page (browser.html) in the broken network.
This commit is contained in:
Ashesh Vashi 2016-03-18 09:57:57 +05:30
parent 0fcfaa4ff2
commit 328428ab22

View File

@ -433,7 +433,10 @@ def index():
current_app.logger.debug('Checking version data at: %s' % url)
try:
response = urlreq.urlopen(url)
# Do not wait for more than 5 seconds.
# It stuck on rendering the browser.html, while working in the
# broken network.
response = urlreq.urlopen(url, data, 5)
current_app.logger.debug('Version check HTTP response code: %d' % response.getcode())
if response.getcode() == 200: