Skip to content

Commit

Permalink
Avoid "no such packet" errors on outgoingClearMessageId.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina committed Jul 8, 2016
1 parent 84e7a6e commit e161a3c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions abstract.js
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,17 @@ function abstractPersistence (opts) {
})
})
})

testInstance('do not error if unkown messageId in outoingClearMessageId', function (t, instance) {
var client = {
id: 'abc-123'
}

instance.outgoingClearMessageId(client, 42, function (err) {
t.error(err)
instance.destroy(t.end.bind(t))
})
})
}

module.exports = abstractPersistence
2 changes: 1 addition & 1 deletion persistence.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ MemoryPersistence.prototype.outgoingClearMessageId = function (client, packet, c
}
}

cb(new Error('no such packet'))
cb()
}

MemoryPersistence.prototype.outgoingStream = function (client) {
Expand Down

0 comments on commit e161a3c

Please sign in to comment.