(1.0.6) Fixed memleak in EaglerXBungee
This commit is contained in:
parent
7d691a2967
commit
af6d2ffc18
Binary file not shown.
|
@ -9,6 +9,7 @@ import com.google.gson.JsonParseException;
|
|||
import com.google.gson.JsonParser;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import io.netty.channel.ChannelFutureListener;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.ChannelInboundHandlerAdapter;
|
||||
|
@ -197,13 +198,13 @@ public abstract class HttpServerQueryHandler extends ChannelInboundHandlerAdapte
|
|||
}
|
||||
|
||||
public void sendBinaryResponse(byte[] bytes) {
|
||||
ByteBuf buf = context.alloc().buffer(bytes.length, bytes.length);
|
||||
ByteBuf buf = Unpooled.buffer(bytes.length, bytes.length);
|
||||
buf.writeBytes(bytes);
|
||||
context.writeAndFlush(new BinaryWebSocketFrame(buf));
|
||||
}
|
||||
|
||||
public void sendBinaryResponseAndClose(byte[] bytes) {
|
||||
ByteBuf buf = context.alloc().buffer(bytes.length, bytes.length);
|
||||
ByteBuf buf = Unpooled.buffer(bytes.length, bytes.length);
|
||||
buf.writeBytes(bytes);
|
||||
context.writeAndFlush(new BinaryWebSocketFrame(buf)).addListener(ChannelFutureListener.CLOSE);
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
|
@ -858,7 +859,7 @@ public class SkinService implements ISkinService {
|
|||
int cooldownPeriod = 60000 / EaglerXBungee.getEagler().getConfig().getAntagonistsRateLimit();
|
||||
int elapsedCooldown = (int)(millis - antagonistCooldown);
|
||||
elapsedCooldown /= cooldownPeriod;
|
||||
if(cooldownPeriod > 0) {
|
||||
if(elapsedCooldown > 0) {
|
||||
antagonistCooldown += elapsedCooldown * cooldownPeriod;
|
||||
synchronized(antagonists) {
|
||||
Iterator<UUID> itr = antagonists.keySet().iterator();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: EaglercraftXBungee
|
||||
main: net.lax1dude.eaglercraft.v1_8.plugin.gateway_bungeecord.EaglerXBungee
|
||||
version: 1.0.5
|
||||
version: 1.0.6
|
||||
description: Plugin to allow EaglercraftX 1.8 players to join your network, or allow EaglercraftX 1.8 players to use your network as a proxy to join other networks
|
||||
author: lax1dude
|
|
@ -1 +1 @@
|
|||
1.0.5
|
||||
1.0.6
|
Loading…
Reference in New Issue
Block a user