From initialMs, doubling to maxMs (whole milliseconds).
Optionalinitial_ms: number | nullOptionalmax_ms: number | nullThe next wait, ms.
The wait before reconnecting after a connection ended, ms.
retryAfterMs is what the end asked for: a close action's
retry_after_ms, retryAfterMs(code) for a socket's close code, or 0
for a failure without a code. With 0, exactly nextDelayJittered.
With more (a terminal close), at least that, doubling with each
terminal close since reset() up to six times it (300000: 5, 10, 20,
then 30 minutes), plus up to a quarter more by random. Reconnect
with a new client id after a terminal close.
The next wait, ms, spread over [half of it, all of it] by random,
drawn uniformly from [0, 1) (Math.random()), so that clients dropped
together do not all come back together. Out of range is clamped, NaN
taken as 0.
The chat feed subscribed: back to the first wait, and the terminal streak ends.
Reconnect delays: 1 s doubling to 30 s, and a slower stage for terminal closes (
nextDelayFor).