Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 82fd1fb

Browse files
authored
Merge pull request #253 from TheDruidsKeeper/patch-1
Fix inaccurate CurrentServerTime
2 parents ed2145a + 4c43d7f commit 82fd1fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ServiceStack.Redis/RedisPubSubServer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public bool AutoRestart
6060
set => Interlocked.CompareExchange(ref autoRestart, value ? YES : NO, autoRestart);
6161
}
6262

63-
public DateTime CurrentServerTime => new DateTime(serverTimeAtStart.Ticks + startedAt.ElapsedTicks, DateTimeKind.Utc);
63+
public DateTime CurrentServerTime => new DateTime(serverTimeAtStart.Ticks + startedAt.Elapsed.Ticks, DateTimeKind.Utc);
6464

6565
public long BgThreadCount => Interlocked.CompareExchange(ref bgThreadCount, 0, 0);
6666

@@ -582,4 +582,4 @@ public virtual void Dispose()
582582
DisposeHeartbeatTimer();
583583
}
584584
}
585-
}
585+
}

0 commit comments

Comments
 (0)