async fn supervise<S>(
socket: &mut ClientSocket<S>,
state: &Arc<TransportState>,
peer: SocketAddr,
settings: Receiver<Option<Arc<str>>>,
sent_settings: Option<Arc<str>>,
progress: &Progress,
) -> Result<()>Expand description
Run one connection under the wedge watchdog.
The keepalive cannot watch its own task: its beat is a branch in the
connection’s own select!, so a connection parked in an await never
reaches it. This watchdog sits outside the future, samples the connection’s
completed writes (the stamp every frame flushes through), and ends it when
none lands within the bound - then runs the same teardown a clean end does,
because a reap that leaked the seat, the take or the browser viewer would
trade a silent hang for a silent leak.