Azure / Azure/azure-iot-sdk-node

when azure iot device is disabled sometimes report properties twin to cloud will success

Open
#1,193 3 comments 0 reactions 0 assignees View on GitHub
bug IoTSDK
Dominant language
JavaScript
Stars
268
Forks
228
PR merge metrics
No merged PRs in 30d

Description

# Context

- **OS and version used:**
- **Node.js version:** <18.10.0>
- **pnpm version:** <8.4.0>
- **list of installed packages:** < "azure-iot-device": "^1.18.2","azure-iot-device-amqp": "^1.14.2",>

## Description of the issue

when i using api to disable a azure iot device, the azure portal show Enable connection to IoT Hub is disable, it can still report properties twin to cloud using amqpws
and I want to retry reconnect every 30s, if the device is enabled.
but before I enabled it, it will always trigger both the connected and disconnected event and sometimes report properties twin to cloud will success even after 5 minutes or restart program.
does the reported success is designed or issue?
if that how can i distinguish is disabled or not?

## Usage
Enable connection to IoT Hub is disable
this.client?._transport.updateTwinReportedProperties every 30s

## Result
the twin is success reported

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.