- if (action==Action.COMPLETE)
- {
- try
- {
- _state.completed();
-
- if (!_response.isCommitted() && !_request.isHandled())
- _response.sendError(404);
- else
- // Complete generating the response
- _response.closeOutput();
- }
- catch(EofException|ClosedChannelException e)
- {
- LOG.debug(e);
- }
- catch(Exception e)
- {
- LOG.warn("complete failed",e);
- }
- finally
- {
- _request.setHandled(true);
- _transport.completed();
- }
- }
-
- LOG.debug("{} handle exit, result {}", this, action);
+ if (LOG.isDebugEnabled())
+ LOG.debug("{} handle exit, result {}", this, action);