'EOF should only be sent when both STDOUT and STDERR have been closed.'

def outConnectionLost(self):

    if self.lostOutOrErrFlag:
        self.session.conn.sendEOF(self.session)
    else:
        self.lostOutOrErrFlag = True
