mirror of
https://github.com/eycorsican/leaf.git
synced 2026-12-05 08:01:26 +00:00
The dial to an outbound was bounded by OUTBOUND_DIAL_TIMEOUT, and nothing after it was. A server that accepted and then never answered -- a TLS ClientHello with no ServerHello, a WebSocket upgrade with no reply -- held the session, and every plugin instance in its chain, for as long as the server stayed up. The client could not end it: leaf does not read from the client until the handshake is done, so it never saw the client leave. OUTBOUND_HANDSHAKE_TIMEOUT, thirty seconds by default and 0 for none, now bounds the protocol handshake of stream and datagram outbounds. A failover is the exception. It already gives each actor its own failTimeout, and one limit around all of them would cut it off before its later actors and its last resort. The dispatcher leaves it unbounded as a whole, and the failover puts the limit around its last resort, which had none. A select passes on whether its chosen actor is one.