Azure / Azure/azure-iot-sdk-csharp
Device Client Reconnects After Extended 'Disconnected_Retrying' State Without Entering 'Retry_Expired' as Documented
- Dominant language
- C#
- Stars
- 477
- Forks
- 492
- Avg merge
- 9h 55m
- Merged PRs (30d)
- 2
Description
### Description:
**Issue Summary:**
With the latest device client version, we have observed that the device enters the 'Disconnected_Retrying' status with the reason 'Communication_Error' and connects back even if the network is restored after 2 days. According to the documentation, it should enter 'retry_expired' after exhausting the retry attempts and timeout period.
**Detailed Description:**
- **Environment:**
- **Lab:** Device transitions back to "Connected" even after days of being in the 'Disconnected_Retrying' state with 'Communication_Error'.
- **Configuration:**
- The 'Operationtimeout_milliseconds' parameter is not defined.
**Expected Behavior:**
The device should transition from 'Disconnected_Retrying' to 'retry_expired' after the retry period of 20 minutes is exhausted, as per the documentation.
**Steps to Reproduce:**
1. Deploy the latest device client version in a lab environment.
2. Induce a communication error to trigger the 'Disconnected_Retrying' state.
3. Monitor the device status for state transitions.
**Actual Behavior:**
- Device reconnects to the network even after being in the 'Disconnected_Retrying' state for an extended period, contrary to the expected transition to 'retry_expired'.
We need help understanding the following:
- Why does the device client reconnect even after days of disconnection without using the 'Operationtimeout_milliseconds' parameter, when the documentation states it should enter 'retry_expired' after 20 minutes?
Any guidance or insights into this behavior would be greatly appreciated.
Contributor guide
Research direction
Start by reviewing the documentation for Disconnected_Retrying, retry_expired, the 20-minute retry period, and Operationtimeout_milliseconds. Reproduce the communication-error scenario and trace the device client's state transitions while the network is unavailable. Done means the observed reconnect behavior is reconciled with the documented transition or the discrepancy is clearly identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100