azalea icon indicating copy to clipboard operation
azalea copied to clipboard

bug: panicked at azalea-client/src/events.rs:164:47:

Open 1zun4 opened this issue 8 months ago • 1 comments

Hello,

https://github.com/azalea-rs/azalea/blob/main/azalea-client/src/events.rs is filled with .unwrap() instead of handling the error properly. And there is no way for me to handle any errors from outside.

2024-05-25T00:53:53.371715Z ERROR tokio-runtime-worker swarmcontrol: panicked at /home/izuna/.cargo/git/checkouts/azalea-2c9a2bd95159baf4/a70e0b6/azalea-client/src/events.rs:164:47:
called `Result::unwrap()` on an `Err` value: SendError { .. } panic.file="/home/izuna/.cargo/git/checkouts/azalea-2c9a2bd95159baf4/a70e0b6/azalea-client/src/events.rs" panic.line=164 panic.column=47

This problem occurs on join, which fails on the first tick. It should therefore throw a result immediately instead of causing tokio threads to panic.

Also not sure if it is really caused by azalea, but I keep growing in memory with every new time I join with a new client. I woke up to 64gb of memory filled up and 12 cores at 100% CPU utilization.

1zun4 avatar May 26 '24 10:05 1zun4