This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
DeviceClient.ReceiveAsync ignores token cancellation #1921
Labels
bug
Something isn't working.
IoTSDK
Tracks all IoT SDK issues across the board
underlying library issue
Context
Description of the issue
DeviceClient.ReceiveAsync(CancellationToken cancellationToken) method does not exit when cancellationToken is cancelled.
The current tests simply verify that the task returns immediately when passed a cancellationToken that is already cancelled.
Code sample exhibiting the issue
Console log of the issue
Expected Result
Workaround
To workaround this I have changed my code to use the ReceiveAsync(TimeSpan) overload, but it feels hacky.
The text was updated successfully, but these errors were encountered: