Description
A potential runtime panic has been identified in the server shutdown logic where the join_all future is polled twice:
- First, it's polled to completion in
tokio::select! with _ = &mut join_all => {}
- Then it's awaited again in the subsequent for loop with
for res in join_all.await
Problem
The JoinAll future is not Fused, which means polling it after it has already returned Ready can cause a panic (related to futures::stream::FuturesUnordered internals).
Location
- File:
src/server.rs
- Lines: 305-317
Context
This issue was identified during code review and needs to be addressed to prevent potential runtime panics during server shutdown.
References
Description
A potential runtime panic has been identified in the server shutdown logic where the
join_allfuture is polled twice:tokio::select!with_ = &mut join_all => {}for res in join_all.awaitProblem
The
JoinAllfuture is not Fused, which means polling it after it has already returned Ready can cause a panic (related tofutures::stream::FuturesUnorderedinternals).Location
src/server.rsContext
This issue was identified during code review and needs to be addressed to prevent potential runtime panics during server shutdown.
References