Azure / Azure/azure-iot-sdk-csharp

[Bug Report] AMQP DeviceClient is slow to respond to device being disabled

Open
#3,422 0 comments 0 reactions 0 assignees View on GitHub
bug IoTSDK
Dominant language
C#
Stars
477
Forks
492
Avg merge
9h 55m
Merged PRs (30d)
2

Description

While investigating this same issue on [the Java SDK](https://github.com/Azure/azure-iot-sdk-java/pull/1774), I noticed that this SDK can take several minutes to notice that the device was disabled from the service side when the hub is a gwv2-enabled hub.

When a device is disabled on a gwv2 hub, that hub sends a "link detached" event to any open links that the device has. However, it seems that this client doesn't notify the user that the connection is lost until several minutes later (after the next keep-alive ping?) which is incorrect. This client should be listening for this "link detached" event and invoke the connection status callback as soon as it is received.

Contributor guide

Open the contributing guide

Research direction

Start by tracing AMQP DeviceClient handling of the "link detached" event and the connection status callback. Reproduce a device being disabled on a gwv2-enabled hub and verify that the callback fires immediately when the link is detached, rather than after the next keep-alive ping.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.