'Called when the transport connection is lost.
Informs all outstanding response handlers that the connection has been
lost, and cleans up all internal state.'

def connectionLost(self, reason):

    self._stillProducing = False
    self.setTimeout(None)
    for stream in self.streams.values():
        stream.connectionLost(reason)
    for streamID in list(self.streams.keys()):
        self._requestDone(streamID)
    if (self._abortingCall is not None):
        self._abortingCall.cancel()
        self._abortingCall = None
