Skip to content

Commit

Permalink
let v1 client connect to v2 server
Browse files Browse the repository at this point in the history
  • Loading branch information
r58Playz committed Apr 16, 2024
1 parent 1c22591 commit fd94f12
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wisp/src/packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?))
}
Expand Down

0 comments on commit fd94f12

Please sign in to comment.