Skip to content

Commit

Permalink
Actually check if the channel is open, fixes GeyserMC#547 (GeyserMC#557)
Browse files Browse the repository at this point in the history
* Moved check of channel open of GeyserMC#547. In previous point was always true and it did not solve problem.

* Moved check of channel open of GeyserMC#547. In previous point was always true and it did not solve problem.

* Make the comment more compact

---------

Co-authored-by: Tim203 <[email protected]>
  • Loading branch information
LittleShyStar02 and Tim203 authored Oct 31, 2024
1 parent 0360721 commit 06f2ed9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,12 @@ public void inject() {
ChannelInitializer<Channel> wrapper = new ChannelInitializer<Channel>() {
@Override
protected void initChannel(Channel channel) {
ReflectionUtils.invoke(original, initChannelMethod, channel);
// Check if the channel is open, see #547
if (!channel.isOpen()) {
return;
}
ReflectionUtils.invoke(original, initChannelMethod, channel);

channel.pipeline().addBefore(
PipelineUtils.FRAME_DECODER, BUNGEE_INIT,
new BungeeClientToProxyInjectInitializer(BungeeInjector.this)
Expand Down

0 comments on commit 06f2ed9

Please sign in to comment.