2021-07-20 01:35:26 +02:00
|
|
|
From 863b4ad3004b71c19707a0921dcaf2695b1e3247 Mon Sep 17 00:00:00 2001
|
2021-05-02 04:43:28 +02:00
|
|
|
From: linsaftw <25271111+linsaftw@users.noreply.github.com>
|
|
|
|
Date: Sat, 1 May 2021 23:28:19 -0300
|
|
|
|
Subject: [PATCH] Always release packet
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java b/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
|
2021-07-20 01:35:26 +02:00
|
|
|
index e5602230..085cda11 100644
|
2021-05-02 04:43:28 +02:00
|
|
|
--- a/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
|
|
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/netty/HandlerBoss.java
|
2021-07-20 01:35:26 +02:00
|
|
|
@@ -113,12 +113,14 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter
|
2021-05-02 04:43:28 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
- if ( handler != null )
|
|
|
|
+ PacketWrapper packet = (PacketWrapper) msg;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ try
|
|
|
|
{
|
|
|
|
- PacketWrapper packet = (PacketWrapper) msg;
|
|
|
|
- boolean sendPacket = handler.shouldHandle( packet );
|
|
|
|
- try
|
|
|
|
+ if ( handler != null )
|
|
|
|
{
|
|
|
|
+ boolean sendPacket = handler.shouldHandle( packet );
|
|
|
|
if ( sendPacket && packet.packet != null )
|
|
|
|
{
|
|
|
|
try
|
2021-07-20 01:35:26 +02:00
|
|
|
@@ -133,10 +135,10 @@ public class HandlerBoss extends ChannelInboundHandlerAdapter
|
2021-05-02 04:43:28 +02:00
|
|
|
{
|
|
|
|
handler.handle( packet );
|
|
|
|
}
|
|
|
|
- } finally
|
|
|
|
- {
|
|
|
|
- packet.trySingleRelease();
|
|
|
|
}
|
|
|
|
+ } finally
|
|
|
|
+ {
|
|
|
|
+ packet.trySingleRelease();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
2021-07-20 01:35:26 +02:00
|
|
|
2.32.0.windows.1
|
2021-05-02 04:43:28 +02:00
|
|
|
|