Skip to content

Conversation

erkia
Copy link
Contributor

@erkia erkia commented Jul 3, 2024

Currently, websocket automatic reconnect delay is implemented using simple vTaskDelay(client->wait_timeout_ms / 2 / portTICK_PERIOD_MS). This has two drawbacks:

  • changing wait timeout while delay is already active has an unpredictable result
  • calling esp_websocket_client_stop() while delay is active will block until (half) reconnect delay is passed, which is especially annoying when delay is long.

This pull requests uses task notifications to wake up websocket task from reconnect delay when necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants