enforce UdpProtocolExtension if requested

This commit is contained in:
Toshit Chawda 2024-04-13 20:32:21 -07:00
parent 397fd43dc5
commit 4d433b60c4
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
2 changed files with 11 additions and 2 deletions

View file

@ -270,6 +270,8 @@ async fn accept_ws(
let (mut mux, fut) =
ServerMux::new(rx, tx, u32::MAX, Some(&[&UdpProtocolExtensionBuilder()])).await?;
println!("{:?}: downgraded: {} extensions supported: {:?}", addr, mux.downgraded, mux.supported_extension_ids);
tokio::spawn(async move {
if let Err(e) = fut.await {
println!("err in mux: {:?}", e);