You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Bug Report] The Direct method on a Azure IoT device timeouts after 24 seconds even after passing higher responseTimeoutInSeconds and connectTimeoutInSeconds to invoke method from DeviceMethod class
#1791
Closed
dudheprajwal opened this issue
Jul 9, 2024
· 1 comment
The Direct method on a Azure IoT device timeouts after 24 seconds with passing higher responseTimeoutInSeconds and connectTimeoutInSeconds to invoke method from DeviceMethod class. The reason for the issue is the below code:
The above part of code is executed from invokeMethod method from DeviceMethod class. This method is called in the hierarchy of invoke method from DeviceMethod class. The invoke method accepts the responseTimeoutInSeconds and connectTimeoutInSeconds bit, they are of no significance because of getHttpConnectTimeout() and getHttpReadTimeout() used with the DeviceOperations.request method. The default values for this parameters is 24 seconds. Hence, even if we pass 30 sec as responseTimeoutInSeconds and connectTimeoutInSeconds for invoke method, the Direct method gets timed out after 24 seconds. So, there is no meaning to provide responseTimeoutInSeconds and connectTimeoutInSeconds.
Console log of the issue
Read timed out
The text was updated successfully, but these errors were encountered:
I believe versions 2.x.x got rid of this odd 24 second timeout, so I'd recommend upgrading to that version. As it stands, we don't plan on making any changes to the 1.X.X SDK versions.
Context
Description of the issue
The Direct method on a Azure IoT device timeouts after 24 seconds with passing higher responseTimeoutInSeconds and connectTimeoutInSeconds to invoke method from DeviceMethod class. The reason for the issue is the below code:
`DeviceOperations.request(var10000, url, var10002, var10003, String.valueOf(var11), this.options.getHttpConnectTimeout(), this.options.getHttpReadTimeout(), proxy);
The above part of code is executed from invokeMethod method from DeviceMethod class. This method is called in the hierarchy of invoke method from DeviceMethod class. The invoke method accepts the responseTimeoutInSeconds and connectTimeoutInSeconds bit, they are of no significance because of getHttpConnectTimeout() and getHttpReadTimeout() used with the DeviceOperations.request method. The default values for this parameters is 24 seconds. Hence, even if we pass 30 sec as responseTimeoutInSeconds and connectTimeoutInSeconds for invoke method, the Direct method gets timed out after 24 seconds. So, there is no meaning to provide responseTimeoutInSeconds and connectTimeoutInSeconds.
Console log of the issue
Read timed out
The text was updated successfully, but these errors were encountered: