struct Cryload::Timeouts

Overview

Socket-level deadlines. v5 set only connect and read, so a peer that accepted the request and then stopped reading could block a worker forever.

Defined in:

cryload/http_client.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(timeout : Time::Span | Nil = nil, request_timeout : Time::Span | Nil = nil) #

Instance Method Detail

def apply(client : HTTP::Client) : Nil #

def deadline_from(start : Time::Instant) : Deadline | Nil #

Absolute deadline for one request, or nil when --request-timeout is unset.


def request_timeout : Time::Span | Nil #

def timeout : Time::Span | Nil #