'Called when local buffer fills up.
The goal is to hit the point where the local file descriptor is not
writeable (or the moral equivalent). The fact that pauseProducing has
been called is not sufficient, since that can happen when Twisted\'s
buffers fill up but OS hasn\'t gotten any writes yet. We want to be as
close as possible to every buffer (including OS buffers) being full.
So, we wait a bit more after this for Twisted to write out a few
chunks, then abortConnection.'

def pauseProducing(self):

    if self.paused:
        return
    self.paused = True
    self.reactor.callLater(0.01, self.doAbort)
