From: Ian Jackson Date: Sat, 1 Apr 2017 20:09:54 +0000 (+0100) Subject: wip, towards target X-Git-Tag: hippotat/1.0.0~55^2~165 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=hippotat.git;a=commitdiff_plain;h=15407d80acf8183a0a56e07590876573fb0c432d wip, towards target --- diff --git a/client b/client index 6402591..afc792d 100755 --- a/client +++ b/client @@ -78,8 +78,8 @@ class ResponseConsumer(twisted.internet.protocol.Protocol): self._log(DBG.HTTP_CTRL, 'connectionMade') def connectionLost(self, reason): - self._log(DBG.HTTP_CTRL, 'connectionLost') - if isinstance(reason, twisted.internet.error.ConnectionDone): + self._log(DBG.HTTP_CTRL, 'connectionLost ' + str(reason)) + if reason.check(twisted.web.client.ResponseDone): try: self._ssd.flush() except Exception as e: self._asyncfailure(e) @@ -87,11 +87,13 @@ class ResponseConsumer(twisted.internet.protocol.Protocol): self._asyncfailure(reason) def _asyncfailure(self, reason): + self._log(DBG.HTTP_CTRL, '_asyncFailure ' + str(reason)) global outstanding outstanding += 1 req_err(self._req, reason) def req_ok(req, resp): + log_debug(DBG.HTTP_CTRL, 'req_ok ' + str(resp), idof=req) rc = ResponseConsumer(req) resp.deliverBody(rc) req_fin() diff --git a/hippotat/__init__.py b/hippotat/__init__.py index 6286f49..798f5d2 100644 --- a/hippotat/__init__.py +++ b/hippotat/__init__.py @@ -201,6 +201,7 @@ def start_ipif(command, router): env=None) def queue_inbound(packet): + log_debug(DBG.FLOW, "queue_inbound", d=packet) ipif.transport.write(slip.delimiter) ipif.transport.write(slip.encode(packet)) ipif.transport.write(slip.delimiter)