check if channel is active before injecting on velocity#629
check if channel is active before injecting on velocity#629linsaftw wants to merge 2 commits intoGeyserMC:masterfrom
Conversation
|
Hi! Thanks for the PR. Would you be able to attach a code snippet or exception log explaining why this code breaks on your fork? Thanks! |
https://mclo.gs/SkjhrJq Basically we apply anti-bot measures on init, so the channel is closed before floodgate handles it. |
|
I would double-check to ensure this PR addresses those changes. We call that original |
This comment was marked as spam.
This comment was marked as spam.
You need to skip invoking anything on initChannel if the channel is closed. |
|
Have you tried without PacketEvents? Seems like this exception is caused by PacketEvents |
|
Note that packetevents has specific behavior when floodgate is present: https://github.com/retrooper/packetevents/blob/2.0/spigot/src/main/java/io/github/retrooper/packetevents/injector/SpigotChannelInjector.java#L168 |
No thats one of many exceptions. I already made a PR for PacketEvents, I also have made a PR for floodgate, and now for ViaVersion. You have to handle inactive channel from other pipeline handlers! Weird to see this hasn't been merged yet. Its not overly complicated! VeloFlame (close and dont inject minecraft decoder when vpn detected) -> Floodgate (channel was not injected, error) -> PacketEvents (same as floodgate) -> ViaVersion (same as floodgate) |
|
Done, thank you guys for your insight, you actually right! |
|
I have to agree with the comment made on your PR to ViaVersion: ViaVersion/ViaVersion#4701 (comment) |
Thank you so much. We changed this on our end. Thank you so much for pointing out the issue! |

This fixes anti-bot support with forks like VeloFlame that act before Geyser and Floodgate and fixes a critical error during initialization if the channel was closed