Skip to content

Commit

Permalink
Update priority_queue.go
Browse files Browse the repository at this point in the history
  • Loading branch information
denopink committed Aug 3, 2024
1 parent 2d37db0 commit 313eda4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/wrphandlers/qos/priority_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ func (pq *priorityQueue) Swap(i, j int) {
}

func (pq *priorityQueue) Push(x any) {
expires := time.Now()
msg := x.(wrp.Message)
pq.sizeBytes += int64(len(msg.Payload))

Expand All @@ -193,7 +192,7 @@ func (pq *priorityQueue) Push(x any) {

pq.queue = append(pq.queue, item{
msg: &msg,
expires: expires.Add(qosExpires),
expires: time.Now().Add(qosExpires),
expired: false})
}

Expand Down

0 comments on commit 313eda4

Please sign in to comment.