Skip to content

Commit

Permalink
http: Put exception in the queue in connection_lost
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mschmitzer committed Aug 4, 2017
1 parent 1d77ca4 commit 7ce4782
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/gruvi/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 7ce4782

Please sign in to comment.