Skip to content

Commit

Permalink
Merge pull request mqttjs#5 from xadh00m/master
Browse files Browse the repository at this point in the history
Do not shift the pubcomp fixed header by qos
  • Loading branch information
mcollina committed Oct 15, 2015
2 parents f966ab2 + 7b12b09 commit e0d3c73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,6 @@ function confirmation(opts) {

if (type === 'pubrel')
qos = 1
else if (type === 'pubcomp')
qos = 2

// Check message ID
if ('number' !== typeof id)
Expand Down
4 changes: 2 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -522,12 +522,12 @@ testParseGenerate('pubrel', {
testParseGenerate('pubcomp', {
cmd: 'pubcomp'
, retain: false
, qos: 2
, qos: 0
, dup: false
, length: 2
, messageId: 2
}, new Buffer([
116, 2, // Header
112, 2, // Header
0, 2 // Message id
]))

Expand Down

0 comments on commit e0d3c73

Please sign in to comment.