Removed some memory leaks
This commit is contained in:
@@ -93,7 +93,10 @@ namespace EonaCat.Logger.LogClient
|
||||
|
||||
private async Task FlushAsync()
|
||||
{
|
||||
if (_logQueue.IsEmpty) return;
|
||||
if (_logQueue.IsEmpty)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
await _flushSemaphore.WaitAsync();
|
||||
try
|
||||
@@ -166,7 +169,10 @@ namespace EonaCat.Logger.LogClient
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (_disposed) return;
|
||||
if (_disposed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_flushTimer?.Dispose();
|
||||
FlushAsync().GetAwaiter().GetResult();
|
||||
|
||||
Reference in New Issue
Block a user