Skip to content

Commit

Permalink
rm unnecessary separate var declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
FZambia committed May 26, 2024
1 parent 139b8ec commit 801f0b5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -656,9 +656,8 @@ func (h *subShard) broadcastPublication(channel string, sp StreamPosition, pub,
// about insufficient state in the stream.
var maxLagExceeded bool
now := time.Now()
var timeLagMilli int64
if pubTime > 0 {
timeLagMilli = now.UnixMilli() - pubTime
timeLagMilli := now.UnixMilli() - pubTime
if h.maxTimeLagMilli > 0 && timeLagMilli > h.maxTimeLagMilli {
maxLagExceeded = true
}
Expand Down

0 comments on commit 801f0b5

Please sign in to comment.