chiark / gitweb /
wip, towards target
[hippotat.git] / client
diff --git a/client b/client
index 16b23f5..e4e5eae 100755 (executable)
--- a/client
+++ b/client
@@ -75,11 +75,17 @@ 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):
       try: self._ssd.flush()
       except Exception as e: asyncfailure(e)
     else:
-      asyncfailure(reason)
+      self._asyncfailure(reason)
+
+  def _asyncfailure(self, reason):
+    global outstanding
+    outstanding += 1
+    req_err(reason)
 
 def req_ok(req, resp):
   rc = ResponseConsumer(req)