browser/gemini: fix crash during handshake

This commit is contained in:
dece 2021-11-15 09:52:01 +01:00
parent ef6b8929e3
commit e0a5ca94ec

View file

@ -111,7 +111,11 @@ def open_gemini_url(
trust_always=True trust_always=True
) )
try:
data = req.proceed() data = req.proceed()
except OSError:
browser.set_status_error(f"Connection error ({url}).")
return None
if not data: if not data:
browser.set_status_error(f"Response empty or timed out ({url}).") browser.set_status_error(f"Response empty or timed out ({url}).")
return None return None