From d839ba0c9beb3165e5249c5c8df6396d506cb048 Mon Sep 17 00:00:00 2001 From: Jashandeep Sohi Date: Sat, 12 Sep 2015 14:23:14 -0700 Subject: [PATCH] Drain response after every chunk write in StaticRoute. --- aiohttp/web_urldispatcher.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aiohttp/web_urldispatcher.py b/aiohttp/web_urldispatcher.py index 10fbf6ebf52..5cc7cd5da19 100644 --- a/aiohttp/web_urldispatcher.py +++ b/aiohttp/web_urldispatcher.py @@ -213,6 +213,7 @@ def handle(self, request): else: while chunk: resp.write(chunk) + yield from resp.drain() chunk = f.read(self._chunk_size) return resp