NetrexMC / RakNet

RakNet implementation in Rust
Apache License 2.0
44 stars 12 forks source link

[BUG] handshake.rs:270:47 called `Result::unwrap()` on an `Err` value: OldSeq #53

Closed honnisha closed 8 months ago

honnisha commented 1 year ago

When running the async-std example, the client throws an error when connecting

version = "0.3.1"

Client (only ip was changed from "na.zeqa.net:19132"):

[rakrs] DBG! [CLIENT] Attempting to connect to address: 0.0.0.0:19133
[rakrs] DBG! [CLIENT] Waiting for pong packet...
[rakrs] DBG! [CLIENT] Recieved pong packet!
[rakrs] DBG! [CLIENT] Starting connection handshake
[rakrs] DBG! [CLIENT] Sending OpenConnectRequest to server...
[rakrs] DBG! [CLIENT] Received OpenConnectReply from server!
[rakrs] DBG! [CLIENT] Discovered MTU size: 1417
[rakrs] DBG! [CLIENT] Sending SessionInfoRequest to server...
[rakrs] DBG! [CLIENT] Received SessionInfoReply from server!
[rakrs] DBG! [CLIENT] Sent ConnectionRequest to server!
thread 'async-std/runtime' panicked at /home/honnisha/Projects/RakNet/src/client/handshake.rs:270:47:
called `Result::unwrap()` on an `Err` value: OldSeq
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Server (debug options was added):

[rakrs] DBG! listener: Bound to 0.0.0.0:19133
[rakrs] DBG! [127.0.0.1:44553] Client requested Mtu Size: 1417
[rakrs] DBG! Creating new session for 127.0.0.1:44553
[rakrs] DBG! Created Session for 127.0.0.1:44553
[rakrs] DBG! [127.0.0.1:44553] Updated mtu size to 1417
john-bv commented 1 year ago

Ah, I know exactly the problem, will fix, did you test the server from async-std as well?

honnisha commented 1 year ago

In my project I used rak-rs = { version = "0.3.1", default-features = false, features = [ "async_tokio", "debug", "debug_all" ], optional = true }