Index: /package_branches/invirt-web/cherrypy/code/main.py
===================================================================
--- /package_branches/invirt-web/cherrypy/code/main.py	(revision 2449)
+++ /package_branches/invirt-web/cherrypy/code/main.py	(revision 2450)
@@ -311,7 +311,12 @@
                 else:
                     print >>sys.stderr, "spawning new session for terminal to ",machine_id
-                    term = self.atsessions[machine_id] = self.atmulti.create(
+                    term = self.atmulti.create(
                         ["ssh", "-e","none", "-l", machine.name, config.console.hostname]
                         )
+                    # Clear out old sessions when fd is reused
+                    for key in self.atsessions:
+                        if self.atsessions[key] == term:
+                            del self.atsessions[key]
+                    self.atsessions[machine_id] = term
                 if k:
                     self.atmulti.proc_write(term,k)
