Reversed that last change which did cause a bug (but not the bug unfortunately), and implemented the last change which might cause issues.

This commit is contained in:
wcrisman
2014-12-07 21:40:13 -08:00
parent 6bd73c6875
commit acbae41318

View File

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