Azure / iotedge

The IoT Edge OSS project
MIT License
1.46k stars 458 forks source link

Correctly close & dispose sdk client on fail to open #7289

Closed nyanzebra closed 3 months ago

nyanzebra commented 4 months ago

From syncing with SDK team in regards to how disposal of SDK client is supposed to work, we need to make sure we call closeAsync and dispose. Relying on just dispose may not correctly clean up resources in all cases.

Azure IoT Edge PR checklist:

This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines and Best Practices

Testing Guidelines

Draft PRs

Note: We use the kodiakhq bot to merge PRs once the necessary checks and approvals are in place. When it merges a PR, kodiakhq converts the PR title to the commit title, PR description to the commit description, and squashes all the commits in the PR to a single commit. The net effect is that entire PR becomes a single commit. Please follow the best practices mentioned here for the PR title and description