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(); close();
}//catch// }//catch//
//The pending outbound message should be set to null if the whole message could be sent.// return sendMore;
return pendingOutboundMessage == null;
}//writeClientResponse()// }//writeClientResponse()//
/* (non-Javadoc) /* (non-Javadoc)
* @see com.foundation.web.server.WebServer.AbstractSocketContext#processRequest() * @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.// //Note: We are throddling this for active connections to prevent a single connection from hogging all the resources.//
while(loopCount < 10 && requiresRead && count > 0) { while(loopCount < 10 && requiresRead && count > 0) {
loopCount++; loopCount++;
//Allow data to be left on the socket read buffer.// //Don't allow data to be left on the socket read buffer.//
if(socketReadBuffer.position() != 0) socketReadBuffer.compact(); socketReadBuffer.position(0);
socketReadBuffer.limit(socketReadBuffer.capacity());
count = channel.read(socketReadBuffer); count = channel.read(socketReadBuffer);
socketReadBuffer.flip(); socketReadBuffer.flip();