Fix and improve session takeover process handling.

This commit is contained in:
Christian
2022-09-14 14:15:35 +02:00
parent c009cbef76
commit d4dad4860a
6 changed files with 59 additions and 45 deletions
@@ -134,7 +134,7 @@ namespace MQTTnet.Implementations
continue;
}
Task.Run(() => TryHandleClientConnectionAsync(clientSocket), cancellationToken).RunInBackground(_logger);
_ = Task.Factory.StartNew(() => TryHandleClientConnectionAsync(clientSocket), cancellationToken, TaskCreationOptions.PreferFairness, TaskScheduler.Default).ConfigureAwait(false);
}
catch (OperationCanceledException)
{