Skip to content

Commit

Permalink
fix: Incorrect last flush time
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Dec 29, 2023
1 parent d85ae4e commit 7662e67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GZCTF/Extensions/DatabaseSinkExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class DatabaseSink : ILogEventSink
{
readonly IServiceProvider _serviceProvider;

static DateTimeOffset LastFlushTime = DateTimeOffset.Now;
static DateTimeOffset LastFlushTime = DateTimeOffset.FromUnixTimeSeconds(0);
static readonly List<LogModel> LockedLogBuffer = new();
static readonly List<LogModel> LogBuffer = new();

Expand Down Expand Up @@ -65,4 +65,4 @@ async Task Flush()
LockedLogBuffer.Clear();
LastFlushTime = DateTimeOffset.Now;
}
}
}

0 comments on commit 7662e67

Please sign in to comment.