Mute unbuffered_flush IOError exception

This commit is contained in:
Émilien Devos 2021-07-02 10:19:47 +00:00 committed by GitHub
parent cf619f24a9
commit 16a96da690
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -700,6 +700,16 @@ def proxy_file(response, env)
end
end
class HTTP::Server::Response
class Output
private def unbuffered_flush
@io.flush
rescue ex : IO::Error
unbuffered_close
end
end
end
class HTTP::Client::Response
def pipe(io)
HTTP.serialize_body(io, headers, @body, @body_io, @version)