Skip to content

Commit 5b467cb

Browse files
committed
fix(websocket): Skip warn on zero timeout and auto reconnect is disabled
1 parent f8a776d commit 5b467cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/esp_websocket_client/esp_websocket_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ esp_websocket_client_handle_t esp_websocket_client_init(const esp_websocket_clie
633633
ESP_WS_CLIENT_MEM_CHECK(TAG, client->config->scheme, goto _websocket_init_fail);
634634
}
635635

636-
if (config->reconnect_timeout_ms <= 0) {
636+
if (!config->disable_auto_reconnect && config->reconnect_timeout_ms <= 0) {
637637
client->wait_timeout_ms = WEBSOCKET_RECONNECT_TIMEOUT_MS;
638638
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);
639639
} else {

0 commit comments

Comments
 (0)