14 Star 5 Fork 32

src-openEuler/gazelle

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0242-fix-redis-coredump-ctrl-c-during-the-pressure-test.patch 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
From c080e30b41f47848de441e96232d255e541a7c1a Mon Sep 17 00:00:00 2001
From: yangchen <yangchen145@huawei.com>
Date: Thu, 1 Aug 2024 15:55:50 +0800
Subject: [PATCH] fix redis coredump: ctrl+c during the pressure test
---
src/lstack/core/lstack_protocol_stack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lstack/core/lstack_protocol_stack.c b/src/lstack/core/lstack_protocol_stack.c
index 2867711..f0f2735 100644
--- a/src/lstack/core/lstack_protocol_stack.c
+++ b/src/lstack/core/lstack_protocol_stack.c
@@ -882,7 +882,7 @@ void stack_tcp_send(struct rpc_msg *msg)
int replenish_again;
struct lwip_sock *sock = lwip_get_socket(fd);
- if (sock == NULL) {
+ if (POSIX_IS_CLOSED(sock)) {
msg->result = -1;
LSTACK_LOG(ERR, LSTACK, "get sock error! fd=%d, len=%ld\n", fd, len);
return;
@@ -919,6 +919,6 @@ void stack_udp_send(struct rpc_msg *msg)
struct lwip_sock *sock = lwip_get_socket(fd);
- if (sock == NULL) {
+ if (POSIX_IS_CLOSED(sock)) {
msg->result = -1;
LSTACK_LOG(ERR, LSTACK, "get sock error! fd=%d, len=%ld\n", fd, len);
return;
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/gazelle.git
git@gitee.com:src-openeuler/gazelle.git
src-openeuler
gazelle
gazelle
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385