13
0
geforkt von Mirrors/Velocity

Wrap plugin message copies in unreleasable copies.

Trying to track down a very weird issue that barely makes sense to me.
Dieser Commit ist enthalten in:
Andrew Steinborn 2020-11-07 09:40:09 -05:00
Ursprung 89e1a07448
Commit 8a3b6403da
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -146,7 +146,7 @@ public class BackendPlaySessionHandler implements MinecraftSessionHandler {
.thenAcceptAsync(pme -> { .thenAcceptAsync(pme -> {
if (pme.getResult().isAllowed() && !playerConnection.isClosed()) { if (pme.getResult().isAllowed() && !playerConnection.isClosed()) {
PluginMessage copied = new PluginMessage(packet.getChannel(), PluginMessage copied = new PluginMessage(packet.getChannel(),
Unpooled.wrappedBuffer(copy)); Unpooled.unreleasableBuffer(Unpooled.wrappedBuffer(copy)));
playerConnection.write(copied); playerConnection.write(copied);
} }
}, playerConnection.eventLoop()) }, playerConnection.eventLoop())

Datei anzeigen

@ -230,7 +230,7 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
server.getEventManager().fire(event).thenAcceptAsync(pme -> { server.getEventManager().fire(event).thenAcceptAsync(pme -> {
if (pme.getResult().isAllowed()) { if (pme.getResult().isAllowed()) {
PluginMessage message = new PluginMessage(packet.getChannel(), PluginMessage message = new PluginMessage(packet.getChannel(),
Unpooled.wrappedBuffer(copy)); Unpooled.unreleasableBuffer(Unpooled.wrappedBuffer(copy)));
backendConn.write(message); backendConn.write(message);
} }
}, backendConn.eventLoop()) }, backendConn.eventLoop())