Wrap plugin message copies in unreleasable copies.

Trying to track down a very weird issue that barely makes sense to me.
This commit is contained in:
Andrew Steinborn 2020-11-07 09:40:09 -05:00
parent 89e1a07448
commit 8a3b6403da
2 changed files with 2 additions and 2 deletions

View File

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

View File

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