|
|
@@ -1511,9 +1511,6 @@ class Worker
|
|
|
\srand();
|
|
|
\mt_srand();
|
|
|
static::$gracefulStop = false;
|
|
|
- if ($worker->reusePort) {
|
|
|
- $worker->listen();
|
|
|
- }
|
|
|
if (static::$status === static::STATUS_STARTING) {
|
|
|
static::resetStd();
|
|
|
}
|
|
|
@@ -2441,6 +2438,12 @@ class Worker
|
|
|
$connection->close();
|
|
|
}
|
|
|
}
|
|
|
+ // Remove worker.
|
|
|
+ foreach(static::$workers as $key => $one_worker) {
|
|
|
+ if ($one_worker->workerId === $this->workerId) {
|
|
|
+ unset(static::$workers[$key]);
|
|
|
+ }
|
|
|
+ }
|
|
|
// Clear callback.
|
|
|
$this->onMessage = $this->onClose = $this->onError = $this->onBufferDrain = $this->onBufferFull = null;
|
|
|
}
|