Skip to content

Commit

Permalink
Merge pull request #521 from johanstokking/fix/websocket/reconnect-ti…
Browse files Browse the repository at this point in the history
…meout-warning

fix(websocket): Skip warn on zero timeout and auto reconnect is disabled  (IDFGH-12288)
  • Loading branch information
gabsuren authored Mar 7, 2024
2 parents f8a776d + 5b467cb commit b5be844
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/esp_websocket_client/esp_websocket_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ esp_websocket_client_handle_t esp_websocket_client_init(const esp_websocket_clie
ESP_WS_CLIENT_MEM_CHECK(TAG, client->config->scheme, goto _websocket_init_fail);
}

if (config->reconnect_timeout_ms <= 0) {
if (!config->disable_auto_reconnect && config->reconnect_timeout_ms <= 0) {
client->wait_timeout_ms = WEBSOCKET_RECONNECT_TIMEOUT_MS;
ESP_LOGW(TAG, "`reconnect_timeout_ms` is not set, or it is less than or equal to zero, using default time out %d (milliseconds)", WEBSOCKET_RECONNECT_TIMEOUT_MS);
} else {
Expand Down

0 comments on commit b5be844

Please sign in to comment.