From adaac65b8b854b42de4012ff8c93363008a6d90c Mon Sep 17 00:00:00 2001
From: yinbin <yinbin8@huawei.com>
Date: Thu, 13 Feb 2025 14:18:22 +0800
Subject: [PATCH] TCP_IN: fix infinite loopping in func min_cnts_lpcb_get

---
 src/core/tcp_in.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c
index 905f7cf..75a2a48 100644
--- a/src/core/tcp_in.c
+++ b/src/core/tcp_in.c
@@ -137,8 +137,8 @@ struct tcp_pcb_listen *min_cnts_lpcb_get(struct tcp_pcb_listen *lpcb)
         min_cnts_lpcb = tmp_lpcb;
         min_conn_num = tmp_lpcb->connect_num;
       }
-      tmp_lpcb = tmp_lpcb->next_same_port_pcb;
     }
+    tmp_lpcb = tmp_lpcb->next_same_port_pcb;
   }
   return min_cnts_lpcb;
 }
-- 
2.34.1

