Ignore:
Timestamp:
Dec 21, 2009, 1:11:48 AM (15 years ago)
Author:
broder
Message:

Clear stale fds out of cache in ajaxterm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package_branches/invirt-web/ajaxterm-rebased/code/main.py

    r2756 r2757  
    420420                else:
    421421                    print >>sys.stderr, "spawning new session for terminal to ",machine_id
    422                     term = self.atsessions[machine_id] = self.atmulti.create(
     422                    term = self.atmulti.create(
    423423                        ["ssh", "-e","none", "-l", machine.name, config.console.hostname]
    424424                        )
     425                    # Clear out old sessions when fd is reused
     426                    for key in self.atsessions:
     427                        if self.atsessions[key] == term:
     428                            del self.atsessions[key]
     429                    self.atsessions[machine_id] = term
    425430                if k:
    426431                    self.atmulti.proc_write(term,k)
Note: See TracChangeset for help on using the changeset viewer.