From d5008b7cbaee6052bc6c19b3df6283b9881e7b0a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 22 Aug 2017 17:24:48 +0100 Subject: [PATCH] do not crash on unexpected connectionLost Signed-off-by: Ian Jackson --- hippotat | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hippotat b/hippotat index 1625628..b8477bb 100755 --- a/hippotat +++ b/hippotat @@ -56,9 +56,10 @@ class ResponseConsumer(GeneralResponseConsumer): self._handleexception() def connectionLost(self, reason): - self._log(DBG.HTTP_CTRL, 'connectionLost ' + str(reason)) + reason_msg = 'connectionLost ' + str(reason) + self._log(DBG.HTTP_CTRL, reason_msg) if not reason.check(twisted.web.client.ResponseDone): - self.latefailure() + self._latefailure(reason_msg) return try: self._log(DBG.HTTP, 'ResponseDone') -- 2.11.0