Refactor async/await and ConcurrentDictionary usage.

This commit is contained in:
Christian Kratky
2018-06-20 20:07:25 +02:00
parent bc20850fba
commit 0322660561
20 changed files with 409 additions and 245 deletions
@@ -82,11 +82,11 @@ namespace MQTTnet.Extensions.Rpc
timeoutCts.Cancel(false);
return result;
}
catch (TaskCanceledException taskCanceledException)
catch (OperationCanceledException exception)
{
if (timeoutCts.IsCancellationRequested && !cancellationToken.IsCancellationRequested)
{
throw new MqttCommunicationTimedOutException(taskCanceledException);
throw new MqttCommunicationTimedOutException(exception);
}
else
{