valence-rs / valence

A Rust framework for building Minecraft servers.
http://valence.rs/
MIT License
2.77k stars 142 forks source link

Broken pipe error when repeatedly connecting and disconnecting #54

Open rj00a opened 2 years ago

rj00a commented 2 years ago

Repeatedly connecting to the server and disconnecting while loading will eventually cause Failed to log in: null in the client and

[2022-09-13T22:46:24Z ERROR valence::server] connection to 127.0.0.1:36030 ended: error during login: Broken pipe (os error 32)

In the server.

I'm not sure if this is actually a bug in Valence or expected Linux socket behavior. It would be interesting to test this on different platforms.

dyc3 commented 2 years ago

I've noticed this a couple times when working on #42. I just kinda assumed it was because of the changes to the encryption I was doing. Just to confirm, this is happening on the main branch?

rj00a commented 2 years ago

Just to confirm, this is happening on the main branch?

Yeah

dyc3 commented 2 years ago

I think a much easier way to reproduce this is just to run an example and spam refresh. Sometimes, valence doesn't respond to the ping.

rj00a commented 2 years ago

I have been unable to reproduce the broken pipe by spam refreshing.

dyc3 commented 2 years ago

It doesn't print anything to the logs, it just kinda hangs. I'll record a video tomorrow

lenajenichen commented 1 year ago

I looked into this problem and it turns out it's actually a Minecraft client error, this happens also on vanilla servers.