Skip to content

Commit

Permalink
#1728 "sessions" object is not a list, so we can't easily aggregate t…
Browse files Browse the repository at this point in the history
…he sessions we find in each authenticator: just return the first non empty values we find

git-svn-id: https://xpra.org/svn/Xpra/trunk@17890 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jan 5, 2018
1 parent 6cc6ae7 commit 9d2eb97
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/xpra/server/proxy/proxy_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,14 @@ def disconnect(reason, *extras):
log.error(" use 'none' to disable authentication")
disconnect(SESSION_NOT_FOUND, "no sessions found")
return
sessions = []
sessions = None
for authenticator in client_proto.authenticators:
try:
auth_sessions = authenticator.get_sessions()
#don't add duplicates:
for x in auth_sessions:
if x not in sessions:
sessions.append(x)
authlog("proxy_auth %s.get_sessions()=%s", authenticator, auth_sessions)
if auth_sessions:
sessions = auth_sessions
break
except Exception as e:
authlog("failed to get the list of sessions from %s", authenticator, exc_info=True)
authlog.error("Error: failed to get the list of sessions using '%s' authenticator", authenticator)
Expand Down

0 comments on commit 9d2eb97

Please sign in to comment.