Skip to content

Commit

Permalink
Optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf committed Jun 22, 2019
1 parent 120085e commit 0c4fccc
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions swoole.cc
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,6 @@ void php_swoole_register_rshutdown_callback(swCallback cb, void *private_data)
rshutdown_callbacks.append(cb, private_data);
}

static void execute_rshutdown_callback()
{
rshutdown_callbacks.execute();
}

static void fatal_error(int code, const char *format, ...)
{
va_list args;
Expand Down Expand Up @@ -767,7 +762,8 @@ PHP_RINIT_FUNCTION(swoole)
PHP_RSHUTDOWN_FUNCTION(swoole)
{
SWOOLE_G(req_status) = PHP_SWOOLE_RSHUTDOWN_BEGIN;
execute_rshutdown_callback();

rshutdown_callbacks.execute();

swoole_server_rshutdown();
swoole_async_coro_rshutdown();
Expand Down

0 comments on commit 0c4fccc

Please sign in to comment.