首次提交

This commit is contained in:
2026-07-13 12:06:16 +08:00
commit e3c810b1a6
1690 changed files with 228324 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
'use strict'
const write = require('../write')
function PubRel (packet) {
this.cmd = 'pubrel'
this.messageId = packet.messageId
}
function handlePubrec (client, packet, done) {
const pubrel = new PubRel(packet)
if (client.clean) {
write(client, pubrel, done)
return
}
client.broker.persistence.outgoingUpdate(
client, pubrel, reply)
function reply (err) {
if (err) {
done(err)
} else {
write(client, pubrel, done)
}
}
}
module.exports = handlePubrec