Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-25 15:50:10 +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.clear();
|
||||||
bytebuf = newPacket;
|
bytebuf = newPacket;
|
||||||
} catch (Exception e) {
|
} catch (Throwable e) {
|
||||||
// Clear Buffer
|
// Clear Buffer
|
||||||
bytebuf.clear();
|
bytebuf.clear();
|
||||||
// Release Packet, be free!
|
// Release Packet, be free!
|
||||||
|
@ -60,7 +60,7 @@ public class BungeeEncodeHandler extends MessageToMessageEncoder<ByteBuf> {
|
|||||||
ProtocolInfo protInfo = info.get(ProtocolInfo.class);
|
ProtocolInfo protInfo = info.get(ProtocolInfo.class);
|
||||||
protInfo.getPipeline().transform(Direction.OUTGOING, protInfo.getState(), wrapper);
|
protInfo.getPipeline().transform(Direction.OUTGOING, protInfo.getState(), wrapper);
|
||||||
wrapper.writeToBuffer(bytebuf);
|
wrapper.writeToBuffer(bytebuf);
|
||||||
} catch (Exception e) {
|
} catch (Throwable e) {
|
||||||
bytebuf.clear();
|
bytebuf.clear();
|
||||||
throw e;
|
throw e;
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -57,7 +57,7 @@ public class SpongeDecodeHandler extends ByteToMessageDecoder {
|
|||||||
|
|
||||||
bytebuf.clear();
|
bytebuf.clear();
|
||||||
bytebuf = newPacket;
|
bytebuf = newPacket;
|
||||||
} catch (Exception e) {
|
} catch (Throwable e) {
|
||||||
// Clear Buffer
|
// Clear Buffer
|
||||||
bytebuf.clear();
|
bytebuf.clear();
|
||||||
// Release Packet, be free!
|
// Release Packet, be free!
|
||||||
|
@ -53,7 +53,7 @@ public class SpongeEncodeHandler extends MessageToByteEncoder {
|
|||||||
ProtocolInfo protInfo = info.get(ProtocolInfo.class);
|
ProtocolInfo protInfo = info.get(ProtocolInfo.class);
|
||||||
protInfo.getPipeline().transform(Direction.OUTGOING, protInfo.getState(), wrapper);
|
protInfo.getPipeline().transform(Direction.OUTGOING, protInfo.getState(), wrapper);
|
||||||
wrapper.writeToBuffer(bytebuf);
|
wrapper.writeToBuffer(bytebuf);
|
||||||
} catch (Exception e) {
|
} catch (Throwable e) {
|
||||||
bytebuf.clear();
|
bytebuf.clear();
|
||||||
throw e;
|
throw e;
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -53,7 +53,7 @@ public class VelocityDecodeHandler extends MessageToMessageDecoder<ByteBuf> {
|
|||||||
|
|
||||||
bytebuf.clear();
|
bytebuf.clear();
|
||||||
bytebuf = newPacket;
|
bytebuf = newPacket;
|
||||||
} catch (Exception e) {
|
} catch (Throwable e) {
|
||||||
// Clear Buffer
|
// Clear Buffer
|
||||||
bytebuf.clear();
|
bytebuf.clear();
|
||||||
// Release Packet, be free!
|
// Release Packet, be free!
|
||||||
|
@ -65,7 +65,7 @@ public class VelocityEncodeHandler extends MessageToMessageEncoder<ByteBuf> {
|
|||||||
bytebuf.clear();
|
bytebuf.clear();
|
||||||
bytebuf.release();
|
bytebuf.release();
|
||||||
bytebuf = newPacket;
|
bytebuf = newPacket;
|
||||||
} catch (Exception e) {
|
} catch (Throwable e) {
|
||||||
bytebuf.clear();
|
bytebuf.clear();
|
||||||
bytebuf.release();
|
bytebuf.release();
|
||||||
newPacket.release();
|
newPacket.release();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren