View | Details | Raw Unified | Return to bug 50620
Collapse All | Expand All

(-)java/org/apache/catalina/connector/CoyoteAdapter.java (-1 / +2 lines)
Lines 331-338 Link Here
331
            req.getRequestProcessor().setWorkerThreadName(null);
331
            req.getRequestProcessor().setWorkerThreadName(null);
332
            // Recycle the wrapper request and response
332
            // Recycle the wrapper request and response
333
            if (!comet) {
333
            if (!comet) {
334
            	// Recycle response first, so that errors while recycling request won't prevent recycle of response
335
                response.recycle();
334
                request.recycle();
336
                request.recycle();
335
                response.recycle();
336
            } else {
337
            } else {
337
                // Clear converters so that the minimum amount of memory 
338
                // Clear converters so that the minimum amount of memory 
338
                // is used by this processor
339
                // is used by this processor
(-)java/org/apache/catalina/connector/Request.java (-3 / +7 lines)
Lines 427-435 Link Here
427
        notes.clear();
427
        notes.clear();
428
        cookies = null;
428
        cookies = null;
429
429
430
        if (session != null) {
430
        // Hold the session object in temp for processing at the end so that any errors won't prevent
431
            session.endAccess();
431
        // clean recycle of the request object.
432
        }
432
        Session tempSession = session;
433
        session = null;
433
        session = null;
434
        requestedSessionCookie = false;
434
        requestedSessionCookie = false;
435
        requestedSessionId = null;
435
        requestedSessionId = null;
Lines 458-463 Link Here
458
                reader = null;
458
                reader = null;
459
            }
459
            }
460
        }
460
        }
461
        // Do session related processing at the end so that any errors won't prevent clean recycle of request object.
462
        if (tempSession != null) {
463
        	tempSession.endAccess();
464
        }
461
465
462
    }
466
    }
463
467

Return to bug 50620