Connection timeouts when using Spigot 1.21.3
jacob1 opened this issue ยท 3 comments
Expected behavior
Using the latest snapshot of this plugin with 1.21.3 support, it shouldn't interfere with server connections.
Actual behavior
Attempting to join the server, the connection will hang for about 10-20 seconds, and then give up with the message "ReadTimeoutException : null" (or another connection timeout error). This prevents joining the server at all.
This will ONLY happen after Server empty for 60 seconds, pausing
has been printed to the console log. DiscordSRV doesn't like something relating to the server pausing.
Steps to reproduce
Setup a fresh Spigot 1.21.3 server, with DiscordSRV as the only plugin. Start it up, and wait 60 seconds. Don't join during this time, the connection hang only happens if there's been no successful joins before. After the server pauses, you're now unable to join.
I ran /discordsrv debugger
in the console (as I couldn't join) and got this output
Here is latest.log
I'd guess there's some kind of thread hung up, but I don't see anything obvious in the logs so I'm at a loss to what causes this. Reproducing it is 100% consistent though.
This issue DOES NOT happen when using Paper, only Spigot. I'd guess that's because Paper worked around it here: PaperMC/Paper#11526 .
Server software and version
CraftBukkit version 4376-Spigot-e65d67a-2702c5c (MC: 1.21.3) (Implementing API version 1.21.3-R0.1-SNAPSHOT)
Checks
- I am not using an outdated version of DiscordSRV.
- I asked in DiscordSRV's Discord server to see whether this issue is in fact a bug that needs to be fixed.
Ticket number or message link to where you asked in DiscordSRV's Discord server about this
19658
Anything else
No response
Also this relates to the pause-when-empty-seconds
option in the server.properties
file
Going by the Paper PR description the issue is probably the player pre login event, which DiscordSRV uses.
Would need to confirm but looks like a Spigot bug