Skip to content

Commit

Permalink
fix for incorrect count of deleted messages in mysql adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Jul 4, 2018
1 parent cb64da9 commit 395a5cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/db/mysql/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -1528,9 +1528,9 @@ func (a *adapter) MessageDeleteList(topic string, toDel *t.DelMessage) (err erro
seqCount := 0
for _, rng := range toDel.SeqIdRanges {
if rng.Hi == 0 {
rng.Hi = rng.Low
rng.Hi = rng.Low + 1
}
seqCount += rng.Hi - rng.Low + 1
seqCount += rng.Hi - rng.Low
if _, err = insert.Exec(topic, forUser, toDel.DelId, rng.Low, rng.Hi); err != nil {
break
}
Expand Down

0 comments on commit 395a5cb

Please sign in to comment.