@Override
	public void pause() throws Exception {
		try {
			endpoint.pause();
		} catch (Exception ex) {
			log.error(sm.getString("http11protocol.endpoint.pauseerror"), ex);
			throw ex;
		}
		canDestroy = false;
		// Wait for a while until all the processors are idle
		RequestInfo[] states = cHandler.global.getRequestProcessors();
		int retry = 0;
		boolean done = false;
		while (!done && retry < org.apache.coyote.Constants.MAX_PAUSE_WAIT) {
			retry++;
			done = true;
			for (int i = 0; i < states.length; i++) {
				if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
					try {
						Thread.sleep(1000);
					} catch (InterruptedException e) {
						// NOTHING TO DO
					}
					done = false;
					break;
				}
			}
			if (done) {
				canDestroy = true;
			}
		}

		log.info(sm.getString("http11protocol.pause", getName()));
	}