mirror of
https://github.com/iv-org/invidious.git
synced 2025-04-22 16:29:10 -04:00
Document known crystal overrides
This commit is contained in:
parent
6bdcd9e96c
commit
dfd660ca72
@ -1,3 +1,7 @@
|
||||
# Override of the TCPSocket and HTTP::Client classes in oder to allow an
|
||||
# IP family to be selected for domains that resolve to both IPv4 and
|
||||
# IPv6 addresses.
|
||||
#
|
||||
class TCPSocket
|
||||
def initialize(host, port, dns_timeout = nil, connect_timeout = nil, family = Socket::Family::UNSPEC)
|
||||
Addrinfo.tcp(host, port, timeout: dns_timeout, family: family) do |addrinfo|
|
||||
@ -10,6 +14,7 @@ class TCPSocket
|
||||
end
|
||||
end
|
||||
|
||||
# :ditto:
|
||||
class HTTP::Client
|
||||
property family : Socket::Family = Socket::Family::UNSPEC
|
||||
|
||||
@ -32,6 +37,9 @@ class HTTP::Client
|
||||
end
|
||||
end
|
||||
|
||||
# Mute the ClientError exception raised when a connection is flushed.
|
||||
# This happends when the connection is unexpectedly closed by the client.
|
||||
#
|
||||
class HTTP::Server::Response
|
||||
class Output
|
||||
private def unbuffered_flush
|
||||
@ -42,6 +50,8 @@ class HTTP::Server::Response
|
||||
end
|
||||
end
|
||||
|
||||
# TODO: Document this override
|
||||
#
|
||||
class PG::ResultSet
|
||||
def field(index = @column_index)
|
||||
@fields.not_nil![index]
|
||||
|
Loading…
x
Reference in New Issue
Block a user