mirror of
https://github.com/netchx/netch.git
synced 2026-05-07 22:44:03 +08:00
Refactor Guard Thread safety
This commit is contained in:
@@ -205,11 +205,11 @@ namespace Netch.Controllers
|
||||
if (!RedirectToFile)
|
||||
return;
|
||||
|
||||
if (_logFileStream == null)
|
||||
return;
|
||||
|
||||
lock (LogStreamLock)
|
||||
{
|
||||
if (_logFileStream == null)
|
||||
return;
|
||||
|
||||
_flushFileStreamTimer.Enabled = false;
|
||||
_logStreamWriter?.Close();
|
||||
_logFileStream?.Close();
|
||||
|
||||
Reference in New Issue
Block a user