Skip to content

Commit

Permalink
Added a test, not deliver will when DISCONNECT
Browse files Browse the repository at this point in the history
  • Loading branch information
gnought committed Aug 24, 2019
1 parent 43ebd72 commit 6e17bac
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/will.js
Expand Up @@ -302,3 +302,20 @@ test('does not deliver will if keepalive is triggered during authentication', fu

willConnect(setup(broker), opts)
})

// [MQTT-3.14.4-1]
test('does not deliver will when client sends a DISCONNECT', function (t) {
var broker = aedes()
var s = willConnect(setup(broker), {},
function () {
s.inStream.end({
cmd: 'disconnect'
})
}
)

s.broker.mq.on('mywill', function (packet, cb) {
t.fail(packet)
})
broker.on('closed', t.end.bind(t))
})

0 comments on commit 6e17bac

Please sign in to comment.