From d651ee3d28765851a88afa59e6f0f5cec6fdf687 Mon Sep 17 00:00:00 2001 From: xiehang Date: Thu, 21 Feb 2019 16:25:07 +0800 Subject: [PATCH] fix the bug in tcp_client Closes https://github.com/espressif/esp-idf/issues/3058 --- examples/protocols/sockets/tcp_client/main/tcp_client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/protocols/sockets/tcp_client/main/tcp_client.c b/examples/protocols/sockets/tcp_client/main/tcp_client.c index 9faaa8c65..1d2486184 100644 --- a/examples/protocols/sockets/tcp_client/main/tcp_client.c +++ b/examples/protocols/sockets/tcp_client/main/tcp_client.c @@ -147,6 +147,7 @@ static void tcp_client_task(void *pvParameters) int err = connect(sock, (struct sockaddr *)&destAddr, sizeof(destAddr)); if (err != 0) { ESP_LOGE(TAG, "Socket unable to connect: errno %d", errno); + break; } ESP_LOGI(TAG, "Successfully connected");