Skip to content

Commit

Permalink
update to 2.5.7 (build 425)
Browse files Browse the repository at this point in the history
  • Loading branch information
crazywhalecc committed Nov 3, 2021
1 parent d3c420e commit 293740f
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 14 deletions.
8 changes: 2 additions & 6 deletions config/global.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@
$config['runtime'] = [
'swoole_coroutine_hook_flags' => SWOOLE_HOOK_ALL & (~SWOOLE_HOOK_CURL),
'swoole_server_mode' => SWOOLE_PROCESS,
'middleware_error_policy' => 1,
'reload_kill_connect' => false,
'global_middleware_binding' => [
]
'middleware_error_policy' => 1
];

/** 轻量字符串缓存,默认开启 */
Expand Down Expand Up @@ -123,8 +120,7 @@
$config['onebot'] = [
'status' => true,
'single_bot_mode' => false,
'message_level' => 99,
'message_format' => 'string'
'message_level' => 99
];

/** 一个远程简易终端,使用nc直接连接即可,但是不建议开放host为0.0.0.0(远程连接) */
Expand Down
27 changes: 27 additions & 0 deletions docs/update/build-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,33 @@

同时此处将只使用 build 版本号进行区分。

## build 425 (2021-11-3)

- 删除未实际应用功能的配置参数
- 修复 reload 时会断开 WebSocket 连接且导致进程崩溃的 Bug

## build 424 (2021-11-2)

- 新增 InstantModule 类、ZMServer 类、ModuleBase 类
- 配置文件新增 `runtime.reload_kill_connect``runtime.global_middleware_binding` 选项
- 修复部分情况下闭包事件分发时崩溃的 bug
- 新增内部方法 `_zm_env_check`
- 调整默认的 OneBot 模块对应的等级从 99999 调整为 99
- 新增导出框架运行参数的列表功能

## build 423 (2021-10-17)

- 修复 PHP 7.2 ~ 7.3 下无法使用新版 MySQL 组件的 bug

## build 422 (2021-10-6)

- 修复 `script_` 前缀无法被排除加载模块的 bug
- 修复 MySQL 组件的依赖问题

## build 421 (2021-9-11)

- 删除多余的调试信息

## build 420 (2021-9-11)

- 修复 OneBot 事件无法响应的 bug
Expand Down
8 changes: 8 additions & 0 deletions docs/update/v2.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# 更新日志(v2 版本)

## v2.5.7 (build 425)

> 更新时间:2021.11.3
- 调低 OneBot 相关事件在 Swoole 的优先级
- 修复部分情况下闭包事件函数分发时引发的崩溃 bug
- 修复 reload 时会断开 WebSocket 连接且导致进程崩溃的 bug

## v2.5.6 (build 423)

> 更新时间:2021.10.17
Expand Down
4 changes: 2 additions & 2 deletions src/ZM/ConsoleApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class ConsoleApplication extends Application
{
private static $obj = null;

const VERSION_ID = 424;
const VERSION = "2.6.0";
const VERSION_ID = 425;
const VERSION = "2.5.7";

/**
* @throws InitException
Expand Down
5 changes: 0 additions & 5 deletions src/ZM/Event/SwooleEvent/OnBeforeReload.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Swoole\Process;
use Swoole\WebSocket\Server;
use ZM\Annotation\Swoole\SwooleHandler;
use ZM\ConnectionManager\ManagerGM;
use ZM\Console\Console;
use ZM\Event\SwooleEvent;

Expand All @@ -23,10 +22,6 @@ public function onCall(Server $server) {
for ($i = 0; $i < ZM_WORKER_NUM; ++$i) {
Process::kill(zm_atomic("_#worker_" . $i)->get(), SIGUSR1);
}
foreach ($server->connections as $fd) {
if (ManagerGM::get($fd) !== null) $server->disconnect($fd);
else $server->close($fd);
}

usleep(800 * 1000);
}
Expand Down
1 change: 0 additions & 1 deletion src/ZM/Framework.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Phar;
use Swoole\Server\Port;
use Throwable;
use ZM\Annotation\CQ\CQCommand;
use ZM\Config\ZMConfig;
use ZM\ConnectionManager\ManagerGM;
use ZM\Console\TermColor;
Expand Down

0 comments on commit 293740f

Please sign in to comment.