From: Bas Verhoeven Date: Tue, 12 Mar 2019 09:44:27 +0000 (+0100) Subject: transport_ws: Stop connecting when the parent's connect call has failed X-Git-Tag: v4.0-beta1~425^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=16ee5663adf3f439e472bcd6bda9ad81f6671b6c;p=esp-idf transport_ws: Stop connecting when the parent's connect call has failed Merges https://github.com/espressif/esp-idf/pull/3164 --- diff --git a/components/tcp_transport/transport_ws.c b/components/tcp_transport/transport_ws.c index a3b97bf925..74f339a0ad 100644 --- a/components/tcp_transport/transport_ws.c +++ b/components/tcp_transport/transport_ws.c @@ -80,7 +80,8 @@ static int ws_connect(esp_transport_handle_t t, const char *host, int port, int { transport_ws_t *ws = esp_transport_get_context_data(t); if (esp_transport_connect(ws->parent, host, port, timeout_ms) < 0) { - ESP_LOGE(TAG, "Error connect to ther server"); + ESP_LOGE(TAG, "Error connect to the server"); + return -1; } unsigned char random_key[16];