You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That an OperationCanceledException gets thrown may happen in this case. But if you catch it, it should be fine. @MarcusWichelmann
You can't just catch the exception, because you use ThreadStart to start the background thread. So the background thread will always just throw and break your entire application whenever you call CloseAsync().
You'd have need to catch the exception from the background-job code.
Based on the API documentation available at
https://vnc-client.marcusw.de/apidoc/api/MarcusW.VncClient.RfbConnection.html#methods,
I attempted to disconnect from the server using two methods bellow, however, both methods resulted in an exception being raised:
RfbConnection.CloseAsync()
RfbConnection.Dispose().
with:
RfbConnection = await _connectionManager.ConnectAsync(parameters, cancellationToken).ConfigureAwait(true);
(Source:
MarcusW.VncClient/samples/AvaloniaVncClient/ViewModels/MainWindowViewModel.cs
Line 93 in 9d9fbf7
I'm uncertain whether my implementation is incorrect or if the two methods mentioned above are not fully implemented yet.
The text was updated successfully, but these errors were encountered: