Short circuited the response linked list since it shouldn't be being used.
This commit is contained in:
@@ -533,18 +533,21 @@ private void prepareResponse() {
|
|||||||
* @result Whether request is in a receive state. Will be false if the request generated a response that could not be completely transmitted.
|
* @result Whether request is in a receive state. Will be false if the request generated a response that could not be completely transmitted.
|
||||||
*/
|
*/
|
||||||
public synchronized boolean sendHttpResponse(Response response) {
|
public synchronized boolean sendHttpResponse(Response response) {
|
||||||
if(currentResponse != null) {
|
//Short circuit the response linked list since it shouldn't be being used.//
|
||||||
lastResponse.setNextResponse(response);
|
|
||||||
lastResponse = response;
|
|
||||||
}//if//
|
|
||||||
else {
|
|
||||||
lastResponse = currentResponse = response;
|
lastResponse = currentResponse = response;
|
||||||
sentBytes = 0;
|
|
||||||
prepareResponse();
|
prepareResponse();
|
||||||
|
// if(currentResponse != null) {
|
||||||
//Note: Not going to process the response on this thread. Allow the flag to be set for writing to the socket, and have the next thread in the network listener handle the write. This allows for cleaner code and pipelining without all the synchronizing.
|
// lastResponse.setNextResponse(response);
|
||||||
// result = internalProcessResponses();
|
// lastResponse = response;
|
||||||
}//else//
|
// }//if//
|
||||||
|
// else {
|
||||||
|
// lastResponse = currentResponse = response;
|
||||||
|
// sentBytes = 0;
|
||||||
|
// prepareResponse();
|
||||||
|
//
|
||||||
|
// //Note: Not going to process the response on this thread. Allow the flag to be set for writing to the socket, and have the next thread in the network listener handle the write. This allows for cleaner code and pipelining without all the synchronizing.
|
||||||
|
//// result = internalProcessResponses();
|
||||||
|
// }//else//
|
||||||
|
|
||||||
request = null;
|
request = null;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user