mirror of https://github.com/rapiz1/rathole.git
fix: remove `assert_eq` for `read_hello`
This commit is contained in:
parent
cdbf8781e4
commit
f772c7cfed
|
@ -192,9 +192,13 @@ pub async fn read_hello<T: AsyncRead + AsyncWrite + Unpin>(conn: &mut T) -> Resu
|
|||
}
|
||||
}
|
||||
Hello::DataChannelHello(v, _) => {
|
||||
// This assert should not fail because the version has already been
|
||||
// checked by ControlChannelHello.
|
||||
assert_eq!(v, CURRENT_PROTO_VERSION);
|
||||
if v != CURRENT_PROTO_VERSION {
|
||||
bail!(
|
||||
"Protocol version mismatched. Expected {}, got {}. Please update `rathole`.",
|
||||
CURRENT_PROTO_VERSION,
|
||||
v
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue