1 Star 0 Fork 32

shafeipaozi/gazelle

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0098-optimize-shutdown-exit-process.patch 913 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 5ca16b89699250a52d11ee5a181fef227fd399b6 Mon Sep 17 00:00:00 2001
From: yangchen <yangchen145@huawei.com>
Date: Mon, 18 Dec 2023 10:50:53 +0800
Subject: [PATCH] optimize shutdown exit process
---
src/lstack/core/lstack_protocol_stack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lstack/core/lstack_protocol_stack.c b/src/lstack/core/lstack_protocol_stack.c
index 8dbd9ad..564f055 100644
--- a/src/lstack/core/lstack_protocol_stack.c
+++ b/src/lstack/core/lstack_protocol_stack.c
@@ -722,7 +722,7 @@ void stack_shutdown(struct rpc_msg *msg)
struct protocol_stack *stack = get_protocol_stack_by_fd(fd);
struct lwip_sock *sock = get_socket(fd);
- if (sock && NETCONN_IS_DATAOUT(sock)) {
+ if (sock && __atomic_load_n(&sock->call_num, __ATOMIC_ACQUIRE) > 0) {
msg->recall_flag = 1;
rpc_call(&stack->rpc_queue, msg);
return;
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/shafeipaozi/gazelle.git
git@gitee.com:shafeipaozi/gazelle.git
shafeipaozi
gazelle
gazelle
master

搜索帮助