From acbae41318663b82d1c63433b1d35ee9c9e4fa06 Mon Sep 17 00:00:00 2001 From: wcrisman Date: Sun, 7 Dec 2014 21:40:13 -0800 Subject: [PATCH] Reversed that last change which did cause a bug (but not the bug unfortunately), and implemented the last change which might cause issues. --- .../src/com/foundation/web/server/WebServer.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Foundation Web Core/src/com/foundation/web/server/WebServer.java b/Foundation Web Core/src/com/foundation/web/server/WebServer.java index b5ac8af..8f149ff 100644 --- a/Foundation Web Core/src/com/foundation/web/server/WebServer.java +++ b/Foundation Web Core/src/com/foundation/web/server/WebServer.java @@ -1498,8 +1498,7 @@ public class WebServer { close(); }//catch// - //The pending outbound message should be set to null if the whole message could be sent.// - return pendingOutboundMessage == null; + return sendMore; }//writeClientResponse()// /* (non-Javadoc) * @see com.foundation.web.server.WebServer.AbstractSocketContext#processRequest() @@ -1728,8 +1727,9 @@ public class WebServer { //Note: We are throddling this for active connections to prevent a single connection from hogging all the resources.// while(loopCount < 10 && requiresRead && count > 0) { loopCount++; - //Allow data to be left on the socket read buffer.// - if(socketReadBuffer.position() != 0) socketReadBuffer.compact(); + //Don't allow data to be left on the socket read buffer.// + socketReadBuffer.position(0); + socketReadBuffer.limit(socketReadBuffer.capacity()); count = channel.read(socketReadBuffer); socketReadBuffer.flip();