[X2Go-Commits] [python-x2go] 02/02: If the listsessions command detects a terminated or suspended session, we have to destroy the corresponding X2GoTerminalSession() to trigger a proper cleanup of that instance.

git-admin at x2go.org git-admin at x2go.org
Thu Oct 9 18:38:53 CEST 2014


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository python-x2go.

commit 9fbb26fd97432ba61f492cb926f8312a1886ce99
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Oct 9 18:38:45 2014 +0200

    If the listsessions command detects a terminated or suspended session, we have to destroy the corresponding X2GoTerminalSession() to trigger a proper cleanup of that instance.
---
 debian/changelog               |    3 +++
 x2go/backends/control/plain.py |    2 ++
 2 files changed, 5 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 8cdfe2c..145425c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -110,6 +110,9 @@ python-x2go (0.5.0.0-0x2go1) UNRELEASED; urgency=low
     - X2GoControlSession: Don't mess with the associated_terminals dict if
       the control session has already died away (i.e. been forcefully
       disconnect).
+    - If the listsessions command detects a terminated or suspended session,
+      we have to destroy the corresponding X2GoTerminalSession() to trigger
+      a proper cleanup of that instance.
   * debian/control:
     + Add dependencies: python-requests, python-simplejson.
     + Add R (python-x2go): sshfs.
diff --git a/x2go/backends/control/plain.py b/x2go/backends/control/plain.py
index d678276..6dfe924 100644
--- a/x2go/backends/control/plain.py
+++ b/x2go/backends/control/plain.py
@@ -1681,10 +1681,12 @@ class X2GoControlSession(paramiko.SSHClient):
                         if hasattr(self.associated_terminals[_session_name], 'session_info') and not self.associated_terminals[_session_name].is_session_info_protected():
                             self.associated_terminals[_session_name].session_info.update(_listsessions[_session_name])
                     else:
+                        self.associated_terminals[_session_name].__del__()
                         try: del self.associated_terminals[_session_name]
                         except KeyError: pass
                         self.terminated_terminals.append(_session_name)
                     if _terminal.is_suspended():
+                        self.associated_terminals[_session_name].__del__()
                         try: del self.associated_terminals[_session_name]
                         except KeyError: pass
 

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/python-x2go.git


More information about the x2go-commits mailing list