'Close the channel if there is no buferred data.  Otherwise, note the
request and return.'

def loseConnection(self):

    self.closing = 1
    if ((not self.buf) and (not self.extBuf)):
        self.conn.sendClose(self)
