mirror of
https://gitea.invidious.io/iv-org/invidious.git
synced 2024-08-15 00:53:41 +00:00
Mute unbuffered_flush IOError exception (#2235)
Related to #1416, it doesn't really fix the real error, but instead mutes the exception message. Like explained in #1416, this "exception Error" while flushing the client data doesn't harm the client-server connection. However, this exception message continuously spams the logs and makes debugging and error finding really difficult.
This commit is contained in:
parent
b5fdd29cd5
commit
0d57a887ea
1 changed files with 10 additions and 0 deletions
|
@ -700,6 +700,16 @@ def proxy_file(response, env)
|
||||||
end
|
end
|
||||||
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
|
class HTTP::Client::Response
|
||||||
def pipe(io)
|
def pipe(io)
|
||||||
HTTP.serialize_body(io, headers, @body, @body_io, @version)
|
HTTP.serialize_body(io, headers, @body, @body_io, @version)
|
||||||
|
|
Loading…
Reference in a new issue