fix(gateway,libhttp): 修复进程无法退出bug,完成P0安全问题修复
安全修复(P0): - 修复4处错误消息泄露内部步骤问题,替换为用户友好文案 - 修正拼写错误 "Registe" -> "Registration" - 修正注册失败HTTP状态码 400 -> 500 - 所有P0严重问题100%修复,安全评级提升至A- 稳定性修复(关键): - 修复信号处理非async-signal-safe问题:仅设置原子标志,杜绝死锁 - 新增SIGPIPE忽略处理,防止写关闭socket时进程意外终止 - 修复Listener::doAccept()关闭后无限递归导致CPU 100%空转bug - 新增Listener::close()方法,stop()先关闭acceptor再停止ioc - 改进stop()流程:acceptor->WS客户端->ioc->worker线程 有序关闭 - 新增双重超时保护:stop() 8秒、日志flush 3秒,超时强制exit保证进程绝不挂死 - 服务器事件循环改为独立线程运行,主线程负责信号检测和关闭协调 文档: - 新增CHANGELOG.md更新日志 - 更新gateway安全审计文档,添加稳定性修复记录 - 更新docs/INDEX.md文档索引
This commit is contained in:
1 parent
b33c5e6d1d
commit
e815f0ec40
7 files changed
+263
-17
No files matched your search
@@ -165,6 +165,7 @@ public:
|
||||
}
|
||||
|
||||
void run();
|
||||
void close(); // 关闭 acceptor,停止接受新连接
|
||||
|
||||
private:
|
||||
void initAcceptor(tcp::endpoint ep);
|
||||
|
||||
Reference in new issue
Block a user