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 17, 2024
1 parent b0d0674 commit b0b842b
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 b0b842b

Please sign in to comment.