Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeviceClient 1.39.0 hangs on close using WinUi3 desktop application #2269

Closed
mavado83 opened this issue Jan 7, 2022 · 4 comments
Closed
Assignees
Labels
fix-checked-in Fix checked into main or preview, but not yet released. IoTSDK Tracks all IoT SDK issues across the board

Comments

@mavado83
Copy link

mavado83 commented Jan 7, 2022

Using Microsoft.Azure.Devices.Client version 1.39.0 in a WinUi 3 desktop app targeting framework => net6.0-windows10.0.19041.0.
When closing the application, the MqTT connection stays open.

 _deviceClient =  DeviceClient.CreateFromConnectionString(_options.DeviceConnectionString, TransportType.Mqtt,  options);

Switched back to version 1.35.0 and the problem does not occur.

@github-actions github-actions bot added the IoTSDK Tracks all IoT SDK issues across the board label Jan 7, 2022
@abhipsaMisra
Copy link
Member

Linked #2163 , #2194

@jamdavi jamdavi self-assigned this Jan 10, 2022
@jamdavi
Copy link
Member

jamdavi commented Jan 10, 2022

We had been waiting on a release from the Netty team and discussed internally the best way to handle the update. The Netty team created a new version of the Common library and we are now taking a dependency on this new version of the library.

This is not required once we release the new SDK but if you want to test this out you can also take a dependency on the latest version of DotNetty.Common and it should replace the assembly at build time.

Note, if you're targeting .NET Full framework such as net472 you'll have to use a binding redirect in your app.config. Visual Studio has an option to generate one automatically.

@mavado83
Copy link
Author

I updated to Azure Client 1.39.0 and referenced DotNetty.Common 0.7.1. I can confirm that the connection is closed as it supposed to be.

@jamdavi jamdavi added the fix-checked-in Fix checked into main or preview, but not yet released. label Jan 11, 2022
@jamdavi
Copy link
Member

jamdavi commented Jan 31, 2022

This is now fixed with version 1.40.0 [https://github.com/Azure/azure-iot-sdk-csharp/releases/tag/2022_01_26].

@jamdavi jamdavi closed this as completed Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix-checked-in Fix checked into main or preview, but not yet released. IoTSDK Tracks all IoT SDK issues across the board
Projects
None yet
Development

No branches or pull requests

3 participants