diff --git a/moonlight-common/src/com/limelight/nvstream/control/ControlStream.java b/moonlight-common/src/com/limelight/nvstream/control/ControlStream.java index 4d5659e3..ed5020f9 100644 --- a/moonlight-common/src/com/limelight/nvstream/control/ControlStream.java +++ b/moonlight-common/src/com/limelight/nvstream/control/ControlStream.java @@ -200,7 +200,7 @@ public class ControlStream implements ConnectionStatusListener, InputPacketSende synchronized (this) { sendPacket(packet); if (context.serverGeneration >= ConnectionContext.SERVER_GENERATION_5) { - enetConnection.readPacket(CONTROL_TIMEOUT); + enetConnection.readPacket(128, CONTROL_TIMEOUT); } else { new NvCtlResponse(in); diff --git a/moonlight-common/src/com/limelight/nvstream/enet/EnetConnection.java b/moonlight-common/src/com/limelight/nvstream/enet/EnetConnection.java index d7eb6602..b49368d6 100644 --- a/moonlight-common/src/com/limelight/nvstream/enet/EnetConnection.java +++ b/moonlight-common/src/com/limelight/nvstream/enet/EnetConnection.java @@ -37,8 +37,8 @@ public class EnetConnection implements Closeable { return conn; } - public ByteBuffer readPacket(int timeout) throws IOException { - ByteBuffer buffer = ByteBuffer.allocate(128); + public ByteBuffer readPacket(int maxSize, int timeout) throws IOException { + ByteBuffer buffer = ByteBuffer.allocate(maxSize); int readLength = readPacket(enetClient, buffer.array(), buffer.limit(), timeout); if (readLength <= 0) {