Skip to content

Commit

Permalink
explicit duration to nanosec conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
taylanisikdemir committed Apr 18, 2024
1 parent 5a2e133 commit 46e2707
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion service/matching/liveness.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (l *liveness) eventLoop() {
func (l *liveness) isAlive() bool {
now := l.timeSource.Now().UnixNano()
lastUpdate := atomic.LoadInt64(&l.lastEventTimeNano)
return now-lastUpdate < int64(l.ttl)
return now-lastUpdate < l.ttl.Nanoseconds()
}

func (l *liveness) markAlive() {
Expand Down

0 comments on commit 46e2707

Please sign in to comment.