Skip to content

Conversation

clecle253
Copy link

No description provided.

@clecle253
Copy link
Author

Hello, I'm using your library on a project which uses an ESP32 with esp-idf and arduino.

During the dev I encountered an issue with the connect() function:
The while (!_client->available()) loop can sometimes loop very quickly. While that's no issue on some MCUs, the esp32 has a task watchdog system: a thread cannot take 100% of the cpu time, and needs to yield once in a while, or the code will crash.

This PR adds a 1ms delay between retries to give time to other threads to do their work, thus fixing the problem.

@Flole998
Copy link

Most likely what you really want is to yield().

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

Successfully merging this pull request may close these issues.

2 participants