Commit ab27debb authored by Yury Selivanov's avatar Yury Selivanov

http/bench: Handle keep-alive properly

parent eed279e2
......@@ -108,6 +108,8 @@ class HttpProtocol(asyncio.Protocol):
resp = b'X' * payload_size
_RESP_CACHE[payload_size] = resp
response.write(resp)
if not self._current_parser.should_keep_alive():
self._transport.close()
self._current_parser = None
self._current_request = None
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment