mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-14 00:28:31 +00: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
|
class TCPSocket
|
||||||
def initialize(host, port, dns_timeout = nil, connect_timeout = nil, family = Socket::Family::UNSPEC)
|
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|
|
Addrinfo.tcp(host, port, timeout: dns_timeout, family: family) do |addrinfo|
|
||||||
@ -10,6 +14,7 @@ class TCPSocket
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# :ditto:
|
||||||
class HTTP::Client
|
class HTTP::Client
|
||||||
property family : Socket::Family = Socket::Family::UNSPEC
|
property family : Socket::Family = Socket::Family::UNSPEC
|
||||||
|
|
||||||
@ -32,6 +37,9 @@ class HTTP::Client
|
|||||||
end
|
end
|
||||||
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 HTTP::Server::Response
|
||||||
class Output
|
class Output
|
||||||
private def unbuffered_flush
|
private def unbuffered_flush
|
||||||
@ -42,6 +50,8 @@ class HTTP::Server::Response
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# TODO: Document this override
|
||||||
|
#
|
||||||
class PG::ResultSet
|
class PG::ResultSet
|
||||||
def field(index = @column_index)
|
def field(index = @column_index)
|
||||||
@fields.not_nil![index]
|
@fields.not_nil![index]
|
||||||
|
Loading…
Reference in New Issue
Block a user