update to 2.3.1 version (build 388)

cleanup code and fix a bug
This commit is contained in:
2021-03-18 14:56:35 +08:00
parent 456b102c15
commit e77b9d4970
57 changed files with 179 additions and 508 deletions

View File

@@ -1,4 +1,4 @@
<?php
<?php /** @noinspection PhpMissingReturnTypeInspection */
namespace Module\Example;
@@ -6,12 +6,12 @@ use ZM\Annotation\Http\Middleware;
use ZM\Annotation\Swoole\OnCloseEvent;
use ZM\Annotation\Swoole\OnOpenEvent;
use ZM\Annotation\Swoole\OnRequestEvent;
use ZM\Annotation\Swoole\OnStart;
use ZM\ConnectionManager\ConnectionObject;
use ZM\Console\Console;
use ZM\Annotation\CQ\CQCommand;
use ZM\Annotation\Http\RequestMapping;
use ZM\Event\EventDispatcher;
use ZM\Exception\InterruptException;
use ZM\Requests\ZMRequest;
use ZM\Utils\ZMUtil;
@@ -135,6 +135,7 @@ class Hello
/**
* 阻止 Chrome 自动请求 /favicon.ico 导致的多条请求并发和干扰
* @OnRequestEvent(rule="ctx()->getRequest()->server['request_uri'] == '/favicon.ico'",level=200)
* @throws InterruptException
*/
public function onRequest() {
EventDispatcher::interrupt();