Azure / Azure/DotNetty

DotNetty.Transport.Channels.ClosedChannelException Errors Thrown and not caught in Try Next

Open
#524 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
4.3k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

I have an IoT application that receives Cloud to Device message from an Azure IoT Hub. With no C2D messages, the application will throw a series of exceptions:

Exception thrown: 'System.OperationCanceledException' in System.Private.CoreLib.dll
Exception thrown: 'System.OperationCanceledException' in System.Private.CoreLib.dll
Exception thrown: 'System.OperationCanceledException' in System.Private.CoreLib.dll
Exception thrown: 'System.OperationCanceledException' in System.Private.CoreLib.dll
Exception thrown: 'Microsoft.Azure.Devices.Client.Exceptions.IotHubCommunicationException' in Microsoft.Azure.Devices.Client.dll
Exception thrown: 'Microsoft.Azure.Devices.Client.Exceptions.IotHubCommunicationException' in System.Private.CoreLib.dll
Exception thrown: 'DotNetty.Transport.Channels.ClosedChannelException' in System.Private.CoreLib.dll
Exception thrown: 'DotNetty.Transport.Channels.ClosedChannelException' in Microsoft.Azure.Devices.Client.dll
Exception thrown: 'DotNetty.Transport.Channels.ClosedChannelException' in System.Private.CoreLib.dll

These errors are not precipitated by a C2D message as there aren't any. These errors are not caught by any error trapping so there is no stack trace or anything else that would give any better information. These errors also do not throw an unhandled exception.

It is difficult to know for sure what is the inner most exception. Since DotNetty seems to be the lowest level, I have stated here.

These exceptions happen without regard to the CPU or device that they are running on.

Azure Device Client v1.21.3
Microsoft.NetCore.UniversalWindowsPlatform 6.2.9

Any thoughts or suggestions would be greatly appreciated.

Thank you in advance.

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.