Commit 5e54036a authored by chenchuanwen's avatar chenchuanwen

bridgeedit

parent e9a1bed0
...@@ -9,6 +9,7 @@ if(!empty($request->get)){ ...@@ -9,6 +9,7 @@ if(!empty($request->get)){
// 触发 reload 之后, 貌似后面的代码也还是会执行的 // 触发 reload 之后, 貌似后面的代码也还是会执行的
$http->reload(); $http->reload();
echo ' ... Under Reload ! ... ' . PHP_EOL . PHP_EOL; // 看看 reload 时是否会执行后续的代码 echo ' ... Under Reload ! ... ' . PHP_EOL . PHP_EOL; // 看看 reload 时是否会执行后续的代码
// $response->end(json_encode(array('status'=>1,'message'=>'重启成功')));
} elseif ($act == 'stop') { } elseif ($act == 'stop') {
// 直接立即终止当前 worker 进程, 和 reload 的效果比较相似, 新的 worker 进程的 ID 和原来的一样 // 直接立即终止当前 worker 进程, 和 reload 的效果比较相似, 新的 worker 进程的 ID 和原来的一样
// 所以程序内部应该尽量避免使用 exit 而应该抛出异常在外部 catch // 所以程序内部应该尽量避免使用 exit 而应该抛出异常在外部 catch
...@@ -21,6 +22,7 @@ if(!empty($request->get)){ ...@@ -21,6 +22,7 @@ if(!empty($request->get)){
$http->shutdown(); $http->shutdown();
echo ' ... After Swoole Shutdown ! ... ' . PHP_EOL . PHP_EOL; echo ' ... After Swoole Shutdown ! ... ' . PHP_EOL . PHP_EOL;
} }
} }
if(!empty($request->post)){ if(!empty($request->post)){
try{ try{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment