Skip to content

Commit

Permalink
Emit closed event only once if double call close()
Browse files Browse the repository at this point in the history
  • Loading branch information
gnought committed Jul 23, 2019
1 parent 7621199 commit 398b2c5
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion aedes.js
Expand Up @@ -284,7 +284,6 @@ function closeClient (client, cb) {
Aedes.prototype.close = function (cb = noop) {
var that = this
if (this.closed) {
this.emit('closed')
return cb()
}
this.closed = true
Expand Down

0 comments on commit 398b2c5

Please sign in to comment.