Adding null checks to StopReceiving methods of clients

This commit is contained in:
Florian Zevedei 2024-11-18 02:47:20 +01:00
parent 667ca5ba6c
commit d72ee38349
2 changed files with 2 additions and 2 deletions

View File

@ -111,7 +111,7 @@ public class MessageClient
public virtual void StopReceiving()
{
_cancellationTokenSource.Cancel();
_cancellationTokenSource?.Cancel();
}

View File

@ -81,7 +81,7 @@ public class ThreadPoolMessageClient : MessageClient
public override void StopReceiving()
{
_cancellationTokenSource.Cancel();
_cancellationTokenSource?.Cancel();
}