chiark
/
gitweb
/
~mdw
/
hippotat
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02a201e
)
hippotatd: catch errors from request.finish in _req_cancel
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 23 Apr 2017 19:51:21 +0000
(20:51 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 23 Apr 2017 19:51:21 +0000
(20:51 +0100)
It is not completely clear when it is necessary to call
request.finish. Doing so when it is not necessary has a tendency to
throw an exception.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
hippotatd
patch
|
blob
|
blame
|
history
diff --git
a/hippotatd
b/hippotatd
index b08ce6673d9cd9373a7025a7908f0f3ef3fc0a97..f3d88d628afddbee0e8e88d81eab2e9a0fa979bb 100755
(executable)
--- a/
hippotatd
+++ b/
hippotatd
@@
-104,7
+104,8
@@
class Client():
def _req_cancel(self, request):
self._log(DBG.HTTP_CTRL, 'cancel', idof=request)
- request.finish()
+ try: request.finish()
+ except Exception: pass
def _req_error(self, err, request):
self._log(DBG.HTTP_CTRL, 'error %s' % err, idof=request)