public function gracefulRestart()
{
$this->graceful = true;
$this->reload = true;
Timer::add(function () {
EventLoop::$instance->stop();
}, $this->reloadDelay * 1000000.0);
$this->setState($this->state);
}