Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-20 06:50:08 +01:00
Fix memory leak
Dieser Commit ist enthalten in:
Ursprung
75d7ffb447
Commit
0613886659
@ -56,7 +56,7 @@ public class BungeeDecodeHandler extends MessageToMessageDecoder<ByteBuf> {
|
||||
|
||||
bytebuf.clear();
|
||||
bytebuf = newPacket;
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
// Clear Buffer
|
||||
bytebuf.clear();
|
||||
// Release Packet, be free!
|
||||
|
@ -60,7 +60,7 @@ public class BungeeEncodeHandler extends MessageToMessageEncoder<ByteBuf> {
|
||||
ProtocolInfo protInfo = info.get(ProtocolInfo.class);
|
||||
protInfo.getPipeline().transform(Direction.OUTGOING, protInfo.getState(), wrapper);
|
||||
wrapper.writeToBuffer(bytebuf);
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
bytebuf.clear();
|
||||
throw e;
|
||||
} finally {
|
||||
|
@ -57,7 +57,7 @@ public class SpongeDecodeHandler extends ByteToMessageDecoder {
|
||||
|
||||
bytebuf.clear();
|
||||
bytebuf = newPacket;
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
// Clear Buffer
|
||||
bytebuf.clear();
|
||||
// Release Packet, be free!
|
||||
|
@ -53,7 +53,7 @@ public class SpongeEncodeHandler extends MessageToByteEncoder {
|
||||
ProtocolInfo protInfo = info.get(ProtocolInfo.class);
|
||||
protInfo.getPipeline().transform(Direction.OUTGOING, protInfo.getState(), wrapper);
|
||||
wrapper.writeToBuffer(bytebuf);
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
bytebuf.clear();
|
||||
throw e;
|
||||
} finally {
|
||||
|
@ -53,7 +53,7 @@ public class VelocityDecodeHandler extends MessageToMessageDecoder<ByteBuf> {
|
||||
|
||||
bytebuf.clear();
|
||||
bytebuf = newPacket;
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
// Clear Buffer
|
||||
bytebuf.clear();
|
||||
// Release Packet, be free!
|
||||
|
@ -65,7 +65,7 @@ public class VelocityEncodeHandler extends MessageToMessageEncoder<ByteBuf> {
|
||||
bytebuf.clear();
|
||||
bytebuf.release();
|
||||
bytebuf = newPacket;
|
||||
} catch (Exception e) {
|
||||
} catch (Throwable e) {
|
||||
bytebuf.clear();
|
||||
bytebuf.release();
|
||||
newPacket.release();
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren