diff -Nur lwip-2.1.3-org/src/api/api_msg.c lwip-2.1.3/src/api/api_msg.c
--- lwip-2.1.3-org/src/api/api_msg.c	2022-09-21 14:18:31.456000000 +0000
+++ lwip-2.1.3/src/api/api_msg.c	2022-09-21 14:19:58.852000000 +0000
@@ -1417,7 +1417,7 @@
         /* Prevent connect while doing any other action. */
         if (msg->conn->state == NETCONN_CONNECT) {
           err = ERR_ALREADY;
-        } else if (msg->conn->state != NETCONN_NONE) {
+        } else if (msg->conn->pcb.tcp->state != ESTABLISHED) {
           err = ERR_ISCONN;
         } else {
           setup_tcp(msg->conn);
diff -Nur lwip-2.1.3-org/src/include/lwipsock.h lwip-2.1.3/src/include/lwipsock.h
--- lwip-2.1.3-org/src/include/lwipsock.h	2022-09-21 14:18:31.440000000 +0000
+++ lwip-2.1.3/src/include/lwipsock.h	2022-09-21 14:22:30.404000000 +0000
@@ -98,6 +98,8 @@
   struct list_node recv_list __rte_cache_aligned;
   struct list_node event_list __rte_cache_aligned;
   struct list_node send_list __rte_cache_aligned;
+  uint32_t in_send __rte_cache_aligned; /* avoid sock too much send rpc msg*/
+  uint32_t send_flag __rte_cache_aligned; /* avoid sock too much send rpc msg*/
   uint32_t epoll_events; /* registered events, EPOLLONESHOT write frequently */
   char pad __rte_cache_aligned;
 
