pub(crate) const DEFAULT_SURB_RESOLUTION_WAIT: Duration;Expand description
Default for PacketPipelineConfig::surb_resolution_wait, used when it is unset.
A momentary gap is normal — the SURB pool refills asynchronously, and dropping a return packet on the first miss loses data on a session that was only waiting. That is why the retry exists.
What it must not do is wait indefinitely. When the counterparty is gone no SURB is ever coming, and because this stage preserves submission order, one such packet withholds every other packet the node would originate, for the life of the process.
Six seconds is deliberately generous, because this is a library default and the useful ceiling belongs to the caller. A packet held past the session’s frame timeout — 3 s for the sessions hoprd runs — cannot be used by the receiver anyway, so a deployment that knows its own timeout should configure something tighter, as hoprd does. What a library default must not do is drop a packet a slower or reliable session would still have made use of, so it errs long and leaves the tightening to whoever knows the traffic.