fix: harden tcp tasks around link readiness and connect retries
This commit is contained in:
+2
-5
@@ -58,17 +58,14 @@ static void tcp_server_task(uint8_t link_index)
|
||||
struct netconn *listener;
|
||||
struct netconn *newconn;
|
||||
|
||||
netconn_thread_init();
|
||||
|
||||
for (;;) {
|
||||
while (g_netif_ready == pdFALSE) {
|
||||
vTaskDelay(pdMS_TO_TICKS(100));
|
||||
}
|
||||
|
||||
cfg = config_get();
|
||||
debug_log_printf("[SRV] idx=%u hwm=%lu en=%u port=%u\r\n",
|
||||
(unsigned int)link_index,
|
||||
(unsigned long)uxTaskGetStackHighWaterMark(NULL),
|
||||
(unsigned int)cfg->links[link_index].enabled,
|
||||
(unsigned int)cfg->links[link_index].local_port);
|
||||
if (cfg->links[link_index].enabled == 0u) {
|
||||
vTaskDelay(pdMS_TO_TICKS(500));
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user