mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Stop using UTC for time in flushClients (#4132)
In #1943 it was adopted to use `UTC()` in some timestamps, but an
unintended side effect from this is that it strips the monotonic time
(e5646b23de),
so it can be prone to clock skews when subtracting time in other areas
of the code.
This commit is contained in:
@@ -1144,7 +1144,7 @@ func (c *client) writeLoop() {
|
||||
// sent to during processing. We pass in a budget as a time.Duration
|
||||
// for how much time to spend in place flushing for this client.
|
||||
func (c *client) flushClients(budget time.Duration) time.Time {
|
||||
last := time.Now().UTC()
|
||||
last := time.Now()
|
||||
|
||||
// Check pending clients for flush.
|
||||
for cp := range c.pcd {
|
||||
|
||||
Reference in New Issue
Block a user