Skip to content

Commit

Permalink
Replace pubrel with pubcomp.
Browse files Browse the repository at this point in the history
In QoS2 sequence,
when the client receives `publish`, the messege is stored into
`incomingStore` and sends pack `pubrec`. Then the server sends `pubrel`
to the client. Finally,  the client calls `handleMessage` with stored
message. If no errors are hannpened, `pubcomp` will be sent, but any errors
are happened, `pubcomp` shouldn't be sent.
This test is for the error case, so I replaced the description.
  • Loading branch information
redboltz committed Nov 1, 2017
1 parent ee05456 commit 63cfd04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/abstract_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ module.exports = function (server, config) {
done()
})

it('should not send a `pubrel` if the execution of `handleMessage` fails for messages with QoS `2`', function (done) {
it('should not send a `pubcomp` if the execution of `handleMessage` fails for messages with QoS `2`', function (done) {
var client = connect()

var messageId = Math.floor(65535 * Math.random())
Expand Down

0 comments on commit 63cfd04

Please sign in to comment.