NZSmartie / CoAP.Net

Constrained Applciaiton Protocol (CoAP) [RFC7252] for .Net Standard
https://nzsmartie.co.nz/CoAP.Net/
Apache License 2.0
34 stars 11 forks source link

CoapClient ReceiveAsync can't be canceld using a CancellationToken #17

Closed CrazyOrange closed 5 years ago

CrazyOrange commented 5 years ago

It seems that it's not possible to cancel a CoapClient ReceiveAsync call by cancling the CancellationToken.

NZSmartie commented 5 years ago

Are you able to provide sample application where ReceiveAsync does not throw a OperationCanceledException when the CancelationToken is canceled? I'm having difficulty reproducing the problem as each scenario in the tests, works.

CrazyOrange commented 5 years ago

Weird, setting some debug breakpoints seems to have fixes this "issue". So I guess this was an debugger cause isse. Sorry.