chiark / gitweb /
wip, towards target
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 1 Apr 2017 20:13:37 +0000 (21:13 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 1 Apr 2017 20:13:49 +0000 (21:13 +0100)
client

diff --git a/client b/client
index 6442154..c08b5fc 100755 (executable)
--- a/client
+++ b/client
@@ -104,15 +104,11 @@ def req_err(req, err):
   reactor.callLater(c.http_retry, (lambda: req_fin(req)))
 
 def req_fin(req):
+  log_debug(DBG.HTTP_CTRL, 'req_fin', idof=req)
   global outstanding
   outstanding -= 1
   check_outbound()
 
-def asyncfailure(reason):
-  global outstanding
-  outstanding += 1
-  req_err(None, reason)
-
 def check_outbound():
   global outstanding
 
@@ -162,6 +158,8 @@ def check_outbound():
                         c.url,
                         twisted.web.client.Headers(hh),
                         producer)
+
+    log_debug(DBG.HTTP_CTRL, 'request', idof=req, d=d)
     req.addTimeout(c.http_timeout, reactor)
     req.addCallback((lambda resp: req_ok(req, resp)))
     req.addErrback((lambda err: req_err(req, err)))