Skip to content

Commit

Permalink
Fix thread tests, optimize swoole_implicit_fn --filter=[thread][compile]
Browse files Browse the repository at this point in the history
matyhtf committed Oct 17, 2024
1 parent bcf6203 commit d77eb74
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ext-src/php_swoole.cc
Original file line number Diff line number Diff line change
@@ -1525,5 +1525,7 @@ static PHP_FUNCTION(swoole_implicit_fn) {
#endif
} else if (SW_STRCASEEQ(fn, l_fn, "abort")) {
abort();
} else {
zend_throw_exception_ex(swoole_exception_ce, SW_ERROR_INVALID_PARAMS, "unknown fn '%s'", fn);
}
}
2 changes: 1 addition & 1 deletion tests/swoole_thread/server/exit.phpt
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@ $serv->on('WorkerStop', function (Server $serv, $workerId) {
});
$serv->on('Request', function ($req, $resp) use ($serv) {
if ($req->server['request_uri'] == '/exit') {
swoole_implicit_fn('exit', CODE);
swoole_implicit_fn('bailout', CODE);
}
});
$serv->on('shutdown', function () {

0 comments on commit d77eb74

Please sign in to comment.