gazelle/0242-fix-redis-coredump-ctrl-c-during-the-pressure-test.patch
yinbin6 d279102850 sync virtio: mod virtio_user_name when multi process is on
(cherry picked from commit 939090a9c23a75c52a2e8dfb88b204f68cf91036)
2024-08-20 14:18:58 +08:00

34 lines
1.1 KiB
Diff

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