quick fix of bug

This commit is contained in:
ayunami2000 2022-07-05 17:51:04 -04:00
parent a744eb114a
commit ab7690f366
2 changed files with 1 additions and 1 deletions

View File

@ -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);