This commit is contained in:
as2252258@163.com
2021-03-28 17:07:04 +08:00
parent d6f8b55d33
commit 107c0fd8ff
2 changed files with 3 additions and 182 deletions
+3 -9
View File
@@ -3,9 +3,6 @@
namespace HttpServer;
use Annotation\Attribute;
use DirectoryIterator;
use HttpServer\Abstracts\Callback;
use HttpServer\Abstracts\HttpService;
use HttpServer\Events\OnClose;
use HttpServer\Events\OnConnect;
@@ -18,12 +15,8 @@ use HttpServer\Service\Packet;
use HttpServer\Service\Websocket;
use Exception;
use ReflectionException;
use Rpc\Producer;
use Rpc\Service;
use Snowflake\Abstracts\Config;
use Snowflake\Core\Json;
use Snowflake\Crontab\Consumer;
use Snowflake\Crontab\ZookeeperProcess;
use Snowflake\Error\LoggerProcess;
use Snowflake\Event;
use Snowflake\Exception\ComponentException;
@@ -53,7 +46,6 @@ defined('PID_PATH') or define('PID_PATH', APP_PATH . 'storage/server.pid');
*/
class Server extends HttpService
{
use Action;
const HTTP = 'HTTP';
const TCP = 'TCP';
@@ -209,7 +201,9 @@ class Server extends HttpService
*/
public function shutdown()
{
$this->stop($this);
/** @var Shutdown $shutdown */
$shutdown = Snowflake::app()->get('shutdown');
$shutdown->shutdown();
}