This commit is contained in:
2021-04-16 15:04:25 +08:00
parent 3314ce3365
commit 559685fdf7
+1 -1
View File
@@ -42,7 +42,7 @@ use Snowflake\Event;
Snowflake::set($this->service, $class);
if ($this->async_reload === true) {
$event = Snowflake::app()->getEvent();
$event->on(Event::SERVER_BEFORE_RELOAD, function () {
$event->on(Event::SERVER_WORKER_EXIT, function () {
Snowflake::app()->remove($this->service);
});
}