Fixed two reliability issues highlighted by SonarCloud (#44)
This commit is contained in:
parent
a2e8ecc23d
commit
967d7a4cc8
1 changed files with 10 additions and 4 deletions
|
|
@ -169,9 +169,12 @@ public sealed class StdioServerTransport : TransportBase, IServerTransport
|
|||
{
|
||||
_logger.TransportCleaningUp(EndpointName);
|
||||
|
||||
_shutdownCts?.Cancel();
|
||||
_shutdownCts?.Dispose();
|
||||
_shutdownCts = null;
|
||||
if (_shutdownCts != null)
|
||||
{
|
||||
await _shutdownCts.CancelAsync().ConfigureAwait(false);
|
||||
_shutdownCts.Dispose();
|
||||
_shutdownCts = null;
|
||||
}
|
||||
|
||||
if (_readTask != null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue