diff --git a/src/main/java/me/ayunami2000/ayungee/WebSocketProxy.java b/src/main/java/me/ayunami2000/ayungee/WebSocketProxy.java index 13a89fd..499e076 100644 --- a/src/main/java/me/ayunami2000/ayungee/WebSocketProxy.java +++ b/src/main/java/me/ayunami2000/ayungee/WebSocketProxy.java @@ -120,7 +120,7 @@ public class WebSocketProxy extends WebSocketServer { int read = selfClient.socketIn.read(data, 0, maxBuffSize); if (read == maxBuffSize) { if (conn.isOpen()) conn.send(data); - } else { + } else if (read > 0) { byte[] trueData = new byte[read]; System.arraycopy(data, 0, trueData, 0, read); if (conn.isOpen()) conn.send(trueData); diff --git a/target/ayungee-1.0-SNAPSHOT-jar-with-dependencies.jar b/target/ayungee-1.0-SNAPSHOT-jar-with-dependencies.jar index bdf65e6..08c7109 100644 Binary files a/target/ayungee-1.0-SNAPSHOT-jar-with-dependencies.jar and b/target/ayungee-1.0-SNAPSHOT-jar-with-dependencies.jar differ