espressif / esp-azure

SDK to connect ESP8266 and ESP32 to Microsoft Azure IoT services
176 stars 92 forks source link

Delays / waits in Direct Method / Device Twin Callbacks (CA-269) #130

Open SputnikTheMighty opened 1 year ago

SputnikTheMighty commented 1 year ago

I've noticed experimentally that within the device twin callback, delays cause crashes. However, within direct method callback, this seems to not be the case. Is it bad practice to have delays within a direct method callback? For example, waiting on a queue to receive some data.

According to Azure, a direct method response can take up to 300s, but I assumed that you can't have the Direct Method handler have a 5 minute delay inside it.