[X2Go-Commits] python-x2go.git - brokerclient (branch) updated: 0.2.1.1-28-gc30e67e
X2Go dev team
git-admin at x2go.org
Tue Jan 7 16:21:37 CET 2014
The branch, brokerclient has been updated
via c30e67e43d69963013b04c27f73e641c671996a3 (commit)
from 7c04590d15e7b41656614a91288d538d28735066 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
debian/changelog | 2 ++
x2go/client.py | 16 +++++++++-------
x2go/session.py | 7 +++----
3 files changed, 14 insertions(+), 11 deletions(-)
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index a1dc40a..87f6a60 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,8 @@ python-x2go (0.4.0.0-0~x2go1) UNRELEASED; urgency=low
Re-arrange class structure for MissingHostKey policies, also provide an
X2goAutoAddPolicy class.
- Fix auto-starting and auto-resuming of sessions.
+ - Avoid false-positive notifications of dead control session directly after
+ a disconnect request from the user.
-- Mike Gabriel <mike.gabriel at das-netzwerkteam.de> Thu, 20 Dec 2012 08:58:44 +0100
diff --git a/x2go/client.py b/x2go/client.py
index 3f4c38c..3a091f2 100644
--- a/x2go/client.py
+++ b/x2go/client.py
@@ -1542,7 +1542,7 @@ class X2GoClient(object):
return self.session_registry(session_uuid).resume(session_name=session_name, session_list=self._X2GoClient__list_sessions(session_uuid=session_uuid), **sessionopts)
except x2go_exceptions.X2GoControlSessionException:
profile_name = self.get_session_profile_name(session_uuid)
- self.HOOK_on_control_session_death(profile_name)
+ if self.session_registry(session_uuid).connected: self.HOOK_on_control_session_death(profile_name)
self.disconnect_profile(profile_name)
__resume_session = resume_session
@@ -1595,7 +1595,7 @@ class X2GoClient(object):
return self.session_registry(session_uuid).control_session.suspend(session_name=session_name, **sessionopts)
except x2go_exceptions.X2GoControlSessionException:
profile_name = self.get_session_profile_name(session_uuid)
- self.HOOK_on_control_session_death(profile_name)
+ if self.session_registry(session_uuid).conntected: self.HOOK_on_control_session_death(profile_name)
self.disconnect_profile(profile_name)
__suspend_session = suspend_session
@@ -1647,7 +1647,7 @@ class X2GoClient(object):
return self.session_registry(session_uuid).control_session.terminate(session_name=session_name, **sessionopts)
except x2go_exceptions.X2GoControlSessionException:
profile_name = self.get_session_profile_name(session_uuid)
- self.HOOK_on_control_session_death(profile_name)
+ if self.session_registry(session_uuid).conntected: self.HOOK_on_control_session_death(profile_name)
self.disconnect_profile(profile_name)
__terminate_session = terminate_session
@@ -2324,7 +2324,7 @@ class X2GoClient(object):
return self.session_registry(session_uuid).is_alive()
except x2go_exceptions.X2GoControlSessionException:
profile_name = self.get_session_profile_name(session_uuid)
- self.HOOK_on_control_session_death(profile_name)
+ if self.session_registry(session_uuid).conntected: self.HOOK_on_control_session_death(profile_name)
self.disconnect_profile(profile_name)
return False
__server_is_alive = server_is_alive
@@ -2900,7 +2900,7 @@ class X2GoClient(object):
try:
self.session_registry.update_status(profile_name=profile_name, session_list=session_list)
except x2go_exceptions.X2GoControlSessionException:
- self.HOOK_on_control_session_death(profile_name)
+ if self.session_registry(session_uuids[0]).connected: self.HOOK_on_control_session_death(profile_name)
self.disconnect_profile(profile_name)
__update_sessionregistry_status_by_profile_name = update_sessionregistry_status_by_profile_name
@@ -2954,7 +2954,8 @@ class X2GoClient(object):
try:
self.listsessions_cache.update(profile_name, update_sessions=_update_sessions, update_desktops=_update_desktops, update_mounts=_update_mounts, )
except x2go_exceptions.X2GoControlSessionException:
- self.HOOK_on_control_session_death(profile_name)
+ c_sessions = self.client_connected_sessions_of_profile_name(profile_name, return_objects=True)
+ if len(c_sessions) and c_sessions[0].connected: self.HOOK_on_control_session_death(profile_name)
self.disconnect_profile(profile_name)
__update_cache_by_profile_name = update_cache_by_profile_name
@@ -3040,7 +3041,8 @@ class X2GoClient(object):
try:
self.session_registry.register_available_server_sessions(profile_name, session_list=session_list, re_register=re_register, skip_pubapp_sessions=skip_pubapp_sessions)
except x2go_exceptions.X2GoControlSessionException, e:
- self.HOOK_on_control_session_death(profile_name)
+ c_sessions = self.client_connected_sessions_of_profile_name(profile_name, return_objects=True)
+ if len(c_sessions) and c_sessions[0].connected: self.HOOK_on_control_session_death(profile_name)
self.disconnect_profile(profile_name)
raise e
__register_available_server_sessions_by_profile_name = register_available_server_sessions_by_profile_name
diff --git a/x2go/session.py b/x2go/session.py
index 0328c41..2284c09 100644
--- a/x2go/session.py
+++ b/x2go/session.py
@@ -1432,7 +1432,7 @@ class X2GoSession(object):
try:
return self.control_session.list_sessions(raw=raw)
except x2go_exceptions.X2GoControlSessionException:
- self.HOOK_on_control_session_death()
+ if self.connected: self.HOOK_on_control_session_death()
self._X2GoSession__disconnect()
return None
__list_sessions = list_sessions
@@ -1452,7 +1452,7 @@ class X2GoSession(object):
try:
return self.control_session.list_desktops(raw=raw)
except x2go_exceptions.X2GoControlSessionException:
- self.HOOK_on_control_session_death()
+ if self.connected: self.HOOK_on_control_session_death()
self._X2GoSession__disconnect()
return None
__list_desktops = list_desktops
@@ -1473,7 +1473,7 @@ class X2GoSession(object):
try:
return self.control_session.list_mounts(self.session_name, raw=raw)
except x2go_exceptions.X2GoControlSessionException:
- self.HOOK_on_control_session_death()
+ if self.connected: self.HOOK_on_control_session_death()
self._X2GoSession__disconnect()
return None
__list_mounts = list_mounts
@@ -1659,7 +1659,6 @@ class X2GoSession(object):
if session_infos:
sorted_session_names = utils.session_names_by_timestamp(session_infos)
- print sorted_session_names
if newest:
if sorted_session_names[0].find('RDP') == -1:
return self.resume(session_name=sorted_session_names[-1])
hooks/post-receive
--
python-x2go.git (Python X2Go Client API)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-x2go.git" (Python X2Go Client API).
More information about the x2go-commits
mailing list