mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-14 10:10:42 -07:00
No longer need to manually delete last message on replace
Signed-off-by: Neil Twigg <neil@nats.io>
This commit is contained in:
@@ -3219,11 +3219,7 @@ func (c *client) mqttHandlePubRetain() {
|
||||
sseq: smr.Sequence,
|
||||
}
|
||||
// Add/update the map
|
||||
oldSeq := asm.handleRetainedMsg(key, rf)
|
||||
// If this is a new message on the same subject, delete the old one.
|
||||
if oldSeq != 0 {
|
||||
asm.deleteRetainedMsg(oldSeq)
|
||||
}
|
||||
asm.handleRetainedMsg(key, rf)
|
||||
} else {
|
||||
c.mu.Lock()
|
||||
acc := c.acc
|
||||
|
||||
Reference in New Issue
Block a user