0

I would like to set the MAX_OPERATION_TIMEOUT, which is set to 4 mins per default in the azure-iot-device/lib/internal_client.js, to another custom value. How can I access that property (e.g. using the ModuleClient/ModuleTwin)?

Flo
  • 31
  • 4

1 Answers1

0

You should be extra careful when changing the retry logic of the SDK, depending on the error type and the retry policy that has been configured, the SDK may or may not retry operations that could not be completed because of an error. From an SDK perspective there are only a few types of failures that can be detected, mostly related to network and protocols. See Connectivity and Retries as reference.

In order to change the const MAX_OPERATION_TIMEOUT value, you could simply clone the SDK and compile it with desired value (following these instructions).

To make it more dynamic and change accordingly to current value of device\module twin, you would need to define a custom desired property and wait for twin updates - when the desired property value is changed you would define a function to change the value of MAX_OPERATION_TIMEOUT. See module\twin_updates sample.

asergaz
  • 996
  • 5
  • 17