Skip to content

Commit d9b17ae

Browse files
committed
kill process after task
1 parent 92cc1b0 commit d9b17ae

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/Core/Server.php

+2-9
Original file line numberDiff line numberDiff line change
@@ -204,16 +204,9 @@ public static function onTask(\Swoole\Server $serv, $taskId, $workerId, $data)
204204
getCiSwooleConfig('starter');
205205
}
206206

207+
// kill process
207208
catch (\Throwable $e) { self::logs($e); }
208-
209-
// ignore...
210-
// finally
211-
// {
212-
// register_shutdown_function(function()
213-
// {
214-
// \Swoole\Process::kill(getmypid());
215-
// });
216-
// }
209+
finally { \Swoole\Process::kill(getmypid()); }
217210
}
218211

219212
// ------------------------------------------------------------------------------

0 commit comments

Comments
 (0)