LogManager: fixed issue that would set queue cancellation token even when logging is stopped causing the logging thread to block when enabling again.

This commit is contained in:
Shreyas Zare
2021-05-01 13:53:23 +05:30
parent a0d5c2b3fb
commit 58f72ce9ba

View File

@@ -247,7 +247,8 @@ namespace DnsServerCore
{
try
{
_queueCancellationTokenSource.Cancel();
if (_logOut != null)
_queueCancellationTokenSource.Cancel();
lock (_logFileLock)
{
@@ -560,7 +561,8 @@ namespace DnsServerCore
{
try
{
_queueCancellationTokenSource.Cancel();
if (_logOut != null)
_queueCancellationTokenSource.Cancel();
lock (_logFileLock)
{