'Closes the connection. Will write any data that is pending to be sent
on the network, but if this response has not yet been written to the
network will not write anything.
@return: L{None}'

def loseConnection(self):

    self._networkProducer.unregisterProducer()
    return self.transport.loseConnection()
