This commit is contained in:
2020-09-07 16:08:17 +08:00
parent 4a11a0e813
commit 5cbf792474
3 changed files with 14 additions and 4 deletions
+2 -3
View File
@@ -18,9 +18,8 @@ class OnStart extends Callback
*/
public function onHandler($server)
{
$time = storage('socket.sock');
Snowflake::writeFile($time, $server->master_pid);
Snowflake::setProcessId($server->master_pid);
$event = Snowflake::app()->event;
if ($event->exists(Event::SERVER_EVENT_START)) {
$event->trigger(Event::SERVER_EVENT_START, null, $server);