From 1b351e166e0dbcdec4df57250776ffc5f8786b91 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 9 Aug 2014 16:57:21 -0400 Subject: [PATCH] Compute delay properly, see comments attached to #263 --- supervisor/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supervisor/http.py b/supervisor/http.py index f65daf142..e5559209a 100644 --- a/supervisor/http.py +++ b/supervisor/http.py @@ -336,9 +336,9 @@ def writable(self, t=time.time): if self.delay: # we called a deferred producer via this channel (see refill_buffer) last_writable_check = self.writable_check - self.writable_check = now elapsed = now - last_writable_check if elapsed > self.delay: + self.writable_check = now return True else: return False