/** Destroy the connection. called by handle when handleNext returns false. */ protected void destroy() { try { close(); } catch (IOException e) { LogSupport.ignore(log, e); } catch (Exception e) { log.warn(LogSupport.EXCEPTION, e); } // Destroy request and response if (_request != null) _request.destroy(); if (_response != null) _response.destroy(); if (_inputStream != null) _inputStream.destroy(); if (_outputStream != null) _outputStream.destroy(); _inputStream = null; _outputStream = null; _request = null; _response = null; _handlingThread = null; if (_statsOn) { _tmpTime = System.currentTimeMillis(); if (_reqTime > 0) _httpServer.statsEndRequest(_tmpTime - _reqTime, false); _httpServer.statsCloseConnection(_tmpTime - _openTime, _requests); } }
/* ------------------------------------------------------------ */ protected void statsRequestEnd() { if (_statsOn && _reqTime > 0) { _httpServer.statsEndRequest(System.currentTimeMillis() - _reqTime, (_response != null)); _reqTime = 0; } }