lib/async/http/protocol/http10.rb in async-http-0.6.0 vs lib/async/http/protocol/http10.rb in async-http-0.8.0

- old
+ new

@@ -43,11 +43,17 @@ while request = Request.new(*self.read_request) status, headers, body = yield request write_response(request.version, status, headers, body) - break unless keep_alive?(request.headers) && keep_alive?(headers) + unless keep_alive?(request.headers) && keep_alive?(headers) + @keep_alive = false + + break + end end + + return false end def write_body(body, chunked = true) buffer = String.new body.each{|chunk| buffer << chunk}