-
-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #211 #212
Fix #211 #212
Conversation
I don't think this failure is because of my changes. Could you restart the Travis CI? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
id: that.id, | ||
brokerId: that.broker.id | ||
}, nop) | ||
} | ||
} | ||
}) | ||
that.will = null // this function might be called twice |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huhm! authorizePublish
is async function. Server will crash when that.broker.publish(that.will, that, done)
called because that.will
is null
Correct, `that.will` should be replaced by a local copy.
Met vriendelijke groet,
Martijn Verbakel
… @nguyenthenguyen commented on this pull request.
In lib/client.js:
> - that.broker.persistence.delWill({
- id: that.id,
- brokerId: that.broker.id
- }, nop)
+ that.broker.publish(that.will, that, done)
+ } else {
+ done()
+ }
+
+ function done (err) {
+ if (!err) {
+ that.broker.persistence.delWill({
+ id: that.id,
+ brokerId: that.broker.id
+ }, nop)
+ }
}
})
that.will = null // this function might be called twice
Huhm! authorizePublish is async function. Server will crash when that.broker.publish(that.will, that, done) called because that.will is null
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@mhverbakel I have make a pull request #213 |
@mhverbakel @mcollina Should we authorization will package when client connect? |
I thought so too, but @mcollina thinks it should be on send (#211 (comment)) |
No description provided.