Parcourir la source

websocket client: the client now aborts the connection if send fails.

Closes IDF-1744
Marius Vikhammer il y a 5 ans
Parent
commit
6bebfc84f3
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      components/esp_websocket_client/esp_websocket_client.c

+ 1 - 0
components/esp_websocket_client/esp_websocket_client.c

@@ -663,6 +663,7 @@ static int esp_websocket_client_send_with_opcode(esp_websocket_client_handle_t c
         if (wlen <= 0) {
             ret = wlen;
             ESP_LOGE(TAG, "Network error: esp_transport_write() returned %d, errno=%d", ret, errno);
+            esp_websocket_client_abort_connection(client);
             goto unlock_and_return;
         }
         current_opcode = 0;