public function maxExecutionTimeExceeded()
    {
        // client went away while waiting for worker
        if (!$this->connectionOpen) {
            return false;
        }

        $this->incoming->write($this->createErrorResponse('504 Gateway Timeout', 'Maximum execution time exceeded'));
        $this->lastOutgoingData = 'not empty'; // Avoid triggering 502

        // mark slave as closed
        $this->slave->close();
        $this->output->writeln(sprintf('Maximum execution time of %d seconds exceeded. Closing worker.', $this->maxExecutionTime));
        $this->slave->getConnection()->close();
    }