OS and version used:
Running on Adafruit Feather M0
SDK version used:
Using the libraries available in the Arduino IDE (AzureIoTUtility) v1.0.45
Description of the issue:
My device uses the LL APIs to continuously send device to cloud messages to the IOT Hub every 20 seconds.IoTHubClient_LL_DoWork() is executed every 100ms.
After about an hour, the connection status callback is invoked with the following values:
/Documents/Arduino/libraries/AzureIoTUtility/src/adapters/tlsio_arduino.c Func:tlsio_arduino_dowork Line:454 SSL closed the connection.
Digging around in the code, I believe this is a problem that occurs when refreshing the SAS token.
If I configure the SAS token lifetime to 5 mins (as shown in the code below), I notice the problem occurs just after 5 minutes.
int sasTokenLifetime = 300;
if (IoTHubClient_LL_SetOption(iotHubClientHandle, OPTION_SAS_TOKEN_LIFETIME, &sasTokenLifetime) != IOTHUB_CLIENT_OK)
{
(void)printf("IOT: Failed to set SAS Token Lifetime.\r\n");
}
OS and version used: Running on Adafruit Feather M0
SDK version used: Using the libraries available in the Arduino IDE (AzureIoTUtility) v1.0.45
Description of the issue:
My device uses the LL APIs to continuously send device to cloud messages to the IOT Hub every 20 seconds.
IoTHubClient_LL_DoWork()
is executed every 100ms.After about an hour, the connection status callback is invoked with the following values:
The trace log outputs the following error:
Digging around in the code, I believe this is a problem that occurs when refreshing the SAS token.
If I configure the SAS token lifetime to 5 mins (as shown in the code below), I notice the problem occurs just after 5 minutes.