fix: Sometimes smartconfig terminates since send UDP fail

This commit is contained in:
Xu Chun Guang
2021-03-06 17:29:50 +08:00
parent 89a3f254b6
commit 5688f4bbe5

View File

@ -180,7 +180,11 @@ static void sc_ack_send_task(void* pvParameters)
}
ESP_LOGE(TAG, "send failed, errno %d", err);
goto _end;
if ((send_sock >= LWIP_SOCKET_OFFSET) && (send_sock <= (FD_SETSIZE - 1))) {
close(send_sock);
}
send_sock = -1;
break;
}
}
} else {