The above snippet works fine, but when the OPC UA server is offline, and I signal a cancel via the passed in cancellationToken, it freezes the whole application. I mean the whole GUI is got freeze. Even though it is wrapped by default a Task.Run. I checked, the code is running in .NET ThreadPool Worker. As you can see I set the scheduler as well, but no effects - the application gets freeze because of this code.
Thanks for your help in advance.
Best Regards,