Skip to content

Commit

Permalink
#3299 also use the ssl retry gui when starting sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Nov 1, 2021
1 parent 0f7e6ea commit 3dad264
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions xpra/scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,7 @@ def do_setup_connection():
except InitExit as e:
from xpra.net.socket_util import ssl_retry
mods = ssl_retry(e, opts.ssl_ca_certs)
log("do_setup_connection() ssl_retry(%s, %s)=%s", e, opts.ssl_ca_certs, mods)
if mods:
for k,v in mods.items():
setattr(opts, k, v)
Expand Down Expand Up @@ -1869,9 +1870,21 @@ def handshake_complete(*_args):
app.show_progress(100, "connection established")
app.after_handshake(handshake_complete)
app.show_progress(60, "starting server")
conn = connect_or_fail(params, opts)
app.setup_connection(conn)
app.show_progress(80, "connecting to server")

while True:
try:
conn = connect_or_fail(params, opts)
app.setup_connection(conn)
app.show_progress(80, "connecting to server")
break
except InitExit as e:
from xpra.net.socket_util import ssl_retry
mods = ssl_retry(e, opts.ssl_ca_certs)
if mods:
for k,v in mods.items():
setattr(opts, k, v)
continue
raise
except Exception as e:
if app:
app.show_progress(100, "failure: %s" % e)
Expand Down

0 comments on commit 3dad264

Please sign in to comment.