From d7f43e72ca643ac16e48f58d511cd2a4e6043b88 Mon Sep 17 00:00:00 2001 From: Yoann Lamouroux Date: Fri, 10 Jan 2020 18:10:24 +0100 Subject: [PATCH] fix: ValueError: math domain error" in table mode when displaying a server replay flow #3778 --- mitmproxy/tools/console/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mitmproxy/tools/console/common.py b/mitmproxy/tools/console/common.py index 325c5740d..3dce8363f 100644 --- a/mitmproxy/tools/console/common.py +++ b/mitmproxy/tools/console/common.py @@ -543,7 +543,7 @@ def format_flow(f, focus, extended=False, hostheader=False, cols=False, layout=' duration = None if f.response.timestamp_end and f.request.timestamp_start: - duration = f.response.timestamp_end - f.request.timestamp_start + duration = max([f.response.timestamp_end - f.request.timestamp_start, 0]) d.update(dict( resp_code=f.response.status_code,