back off between failed broker recvs in the serve loop
This commit is contained in:
parent
ccc6993703
commit
0599c132e5
2 changed files with 180 additions and 16 deletions
|
|
@ -31,7 +31,10 @@ agents) runs:
|
|||
1. Long-poll `Recv` on its socket. The host-side broker
|
||||
(`broker.rs::recv_blocking_batch`) returns immediately if there's
|
||||
a pending message, otherwise waits up to 30 s for a broker `Sent`
|
||||
event for this recipient.
|
||||
event for this recipient. After a failed `Recv` (a socket error, or
|
||||
a broker error, which comes back at once) the loop waits before the
|
||||
next one: 250 ms, doubling up to 30 s, and no wait again once a
|
||||
`Recv` succeeds. Todo wakes and local messages don't wait for it.
|
||||
2. Pop one message. Peek the remaining inbox depth with `Status`.
|
||||
3. Emit `LiveEvent::TurnStart { from, body, unread }` onto the SSE
|
||||
bus.
|
||||
|
|
|
|||
Loading…
Reference in a new issue