@Override
	public final void execute() throws InterruptedException {
		
		try {
			while (!stop) {
				if (socket == null && se.offer(this, se.lingerTimeMs)) {
					socketAvailable.acquire();
				}
				if (socket == null) { if (!stop) stop = (se.getWorkerAmount() > se.minWorkers); continue; }
				if (!isValidSocket()) { closeSocket(); se.processed.incrementAndGet(); continue; }
				se.processing.incrementAndGet();
				communicate(se.processing.get() > se.maxProcessing);
				socket = null;
				se.processing.decrementAndGet();
				se.processed.incrementAndGet();
			}
		} finally {
			if (socket != null) {
				se.processing.decrementAndGet();
				se.processed.incrementAndGet();
				closeSocket();
			}
			if (!se.removeWorker(this)) {
				log.warn("Socket worker " + threadName + " was not registered as worker.");
			}
		}
	}