Carpet

Carpet

2M Downloads

[Suggestion] Read and Login timeouts

Opened this issue · 7 comments

commented

The read and login timeouts are hardcoded in vanilla Minecraft, and are often not long enough for slower computers, my friends and i try to play Minecraft on latest snapshot's but their internet connection is slow, and server times them out before they even connect.
Will carpet ever add a way to edit read and login timeouts??

commented

I also really need this, can't host 1.17.1 server due to my slow upload speed. Increasing timeouts with RandomPatches (for 1.16.5 sadly) works and also Paper server sofware works. Details: https://www.reddit.com/r/admincraft/comments/op1y3a/friends_cant_play_in_my_locally_hosted_fabric/?utm_source=share&utm_medium=web2x&context=3

I have tried Carped mod with default settings btw

commented

Actually, the timeout is 600 game ticks, not 30 seconds. This means that if you /tick warp the server and it pushes the tick rate high enough, the effective timeout can shorten to less than a second, effectively kicking any new players that try to join (players already online can stay online for as long as they have fast connection).

commented

Yes, I need this as well since the 1.18 update will make the chunks even larger. The hardcoded 30 seconds for login/keepalive set by the vanilla game is far too short for players with bad connections. Oftentimes these players are timed out by the server before the players' render distance is loaded in. The RandomPatches mod supports modifying these timeouts (link), but it seems that that mod went unmaintained months ago. It doesn't work with 1.17, let alone 1.18 snapshots. It would be really helpful if carpet could have this feature. Thanks!

commented

Actually, the timeout is 600 game ticks, not 30 seconds. This means that if you /tick warp the server and it pushes the tick rate high enough, the effective timeout can shorten to less than a second, effectively kicking any new players that try to join (players already online can stay online for as long as they have fast connection).

Wow, setting an immutable timeout is already not so user-friendly, but the idea of coupling network timeouts with game simulation speed is really out of my mind 🤦‍♂️

commented

Looking at code now, it looks like maybe it's fixed now? Looking at ServerConnectionListener#startTcpServerListener method, it seems that the timeout is set to 30 seconds not 600 ticks. However this value seems hardcoded and I don't know mixins well enough to change it.

commented

good idea. Important also when server is tick warping for example.

commented

currently 1.12 carpet replaces timeouts in game ticks to timeout in seconds I believe.
That could be replaced with

  • extended tick delays if tick rate is higher
  • equivalent in irl seconds in case of warping

That would preserve vanilla behaviours in case game runs normally.