remove invalidstreamtype to allow for custom protocol extension streams

This commit is contained in:
Toshit Chawda 2024-04-13 16:49:07 -07:00
parent b8eb13903b
commit 397fd43dc5
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
3 changed files with 49 additions and 36 deletions

View file

@ -247,6 +247,10 @@ async fn handle_mux(packet: ConnectPacket, mut stream: MuxStream) -> Result<bool
}
}
}
StreamType::Unknown(_) => {
stream.close(CloseReason::ServerStreamInvalidInfo).await?;
return Ok(false);
}
}
Ok(true)
}