26 lines
988 B
Diff
26 lines
988 B
Diff
From 76c84f12bbcaf36f367252adc0a6da1bfee05de1 Mon Sep 17 00:00:00 2001
|
|
From: yinbin <yinbin8@huawei.com>
|
|
Date: Sat, 15 Feb 2025 16:41:13 +0800
|
|
Subject: [PATCH] Connect: fix benchmark_dws connect failed
|
|
|
|
---
|
|
src/lstack/api/lstack_wrap.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/lstack/api/lstack_wrap.c b/src/lstack/api/lstack_wrap.c
|
|
index 97e927a..e90c523 100644
|
|
--- a/src/lstack/api/lstack_wrap.c
|
|
+++ b/src/lstack/api/lstack_wrap.c
|
|
@@ -404,7 +404,7 @@ static int32_t do_connect(int32_t s, const struct sockaddr *addr, socklen_t addr
|
|
|
|
/* When the socket is POSIX_LWIP_OR_KERNEL, connect to lwip first and then connect to kernel. */
|
|
ret = g_wrap_api->connect_fn(s, addr, addrlen);
|
|
- if (ret == 0 || (ret != 0 && errno == EINPROGRESS)) {
|
|
+ if (ret == 0 || (ret != 0 && (errno == EINPROGRESS || errno == EISCONN))) {
|
|
POSIX_SET_TYPE(sock, POSIX_LWIP);
|
|
} else {
|
|
ret = posix_api->connect_fn(s, addr, addrlen);
|
|
--
|
|
2.33.0
|
|
|