let v1 client connect to v2 server

This commit is contained in:
Toshit Chawda 2024-04-16 01:44:55 -07:00
parent 1c22591817
commit fd94f1245a
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D

View file

@ -423,6 +423,9 @@ impl Packet {
{
extension.handle_packet(bytes, read, write).await?;
Ok(None)
} else if packet_type == 0x05 {
// Server may send a 0x05 in handshake since it's Wisp v2 but we may be Wisp v1 so we need to ignore 0x05
Ok(None)
} else {
Ok(Some(Self::parse_packet(packet_type, bytes)?))
}