Sometimes connecting fails with the following error:
thread '[5]' panicked at core\src\network\user.rs:304:29:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
This only seems to happen when the client for some reason fails to connect the first time and then you try to connect again. I assume this might be caused by Minecraft trying to continue where it left off previously (in this case it didn't manage to send the login packet) instead of fully reconnecting. So Minecraft would have already sent a disconnect packet causing the server to fully destroy all client data, but then on the second connection attempt, Minecraft immediately sends a login packet instead of first initiating the RakNet connection.
This seems more like a bug in the game than in the server and should probably be explicitly handled by the server by simply disconnecting the client and forcing them to fully reconnect.
Sometimes connecting fails with the following error:
This only seems to happen when the client for some reason fails to connect the first time and then you try to connect again. I assume this might be caused by Minecraft trying to continue where it left off previously (in this case it didn't manage to send the login packet) instead of fully reconnecting. So Minecraft would have already sent a disconnect packet causing the server to fully destroy all client data, but then on the second connection attempt, Minecraft immediately sends a login packet instead of first initiating the RakNet connection.
This seems more like a bug in the game than in the server and should probably be explicitly handled by the server by simply disconnecting the client and forcing them to fully reconnect.