queue.append(packet)
check_outbound()
+def crashy(): assert(False)
+
class ResponseConsumer(twisted.internet.protocol.Protocol):
def __init__(self, req):
self._req = req
- self._ssd = SlipStreamDecoder(queue_inbound)
+ self._ssd = SlipStreamDecoder(crashy)
self._log(DBG.HTTP_CTRL, '__init__')
def _log(self, dflag, msg, **kwargs):
try:
self._ssd.inputdata(mime_translate(data))
except Exception as e:
- self._asyncfailure(e)
+ self._handleexception()
def connectionMade(self):
self._log(DBG.HTTP_CTRL, 'connectionMade')
try:
self._ssd.flush()
except Exception as e:
- self._asyncfailure(e)
+ self._handleexception()
+
+ def _handleexception(self):
+ self._asyncfailure(traceback.format_exc())
def _asyncfailure(self, reason):
self._log(DBG.HTTP_CTRL, '_asyncFailure ' + str(reason))