Skip to content
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

Fixed #158. #159

Merged
merged 1 commit into from
Feb 2, 2019
Merged

Fixed #158. #159

merged 1 commit into from
Feb 2, 2019

Conversation

redboltz
Copy link
Owner

@redboltz redboltz commented Feb 2, 2019

The main point of the fix is async_send_publish().

In do_async_write() the actual writing prosess is post. And the posted
process could be handled by other thread. Then pubrec, pubrel, and
pubcomp process could be processed before store_.emplace() is
called.

This fix avoid it. After the fix, store_.emplace() is processed brefore do_async_write().

The main point of the fix is `async_send_publish()`.

In `do_async_write()` the actual writing prosess is post. And the posted
process could be handled by other thread. Then pubrec, pubrel, and
pubcomp process could be processed **before** `store_.emplace()` is
called.

This fix avoid it. After the fix, `store_.emplace()` is processed **brefore** `do_async_write()`.
@redboltz
Copy link
Owner Author

redboltz commented Feb 2, 2019

Other updates, send_publish(), async_send_pubrel(), and send_pubrel() , are for consistency.
First, insert store_, and then, send.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant