From 7ce4782cb697c1eb67b8461113629a69810d4cea Mon Sep 17 00:00:00 2001 From: Marc Schmitzer Date: Fri, 4 Aug 2017 14:21:32 +0200 Subject: [PATCH] http: Put exception in the queue in connection_lost The client fiber may already be blocked on the queue (in getresponse) when connection_lost is invoked. The code in getresponse already handles getting an exception from the queue. --- lib/gruvi/http.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/gruvi/http.py b/lib/gruvi/http.py index 4298ee5..0d88ab1 100644 --- a/lib/gruvi/http.py +++ b/lib/gruvi/http.py @@ -1082,6 +1082,7 @@ def connection_lost(self, exc): if self._message: self._message.body.buffer.feed_error(exc) self._error = exc + self._queue.put_nowait(exc) @property def writer(self):