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

PUBLISH packet should NOT update the outgoing queue #30

Commits on Jul 11, 2019

  1. Update README.md

    gnought authored Jul 11, 2019
    Configuration menu
    Copy the full SHA
    3348778 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2019

  1. Fixed typo & standardize

    gnought committed Jul 15, 2019
    Configuration menu
    Copy the full SHA
    c0b1821 View commit details
    Browse the repository at this point in the history
  2. Added nodejs 12 support

    gnought committed Jul 15, 2019
    Configuration menu
    Copy the full SHA
    a0c6c1e View commit details
    Browse the repository at this point in the history
  3. PUBLISH packet should NOT update the outgoing queue

    Broker uses `brokerCounter` to track how many packets it emits, as `messageId` will be rotated after it reaches max 65535. If there are two PUBLISH packets which brokerCounter is different but same messageId, the second PUBLISH will update the first slot in the queue, as `outgoingUpdate` is using `for` loop starting at index 0. This will fix the issue. We use `outgoingEnqueue` or `outgoingEnqueueCombi` to enqueue PUBLISH packets, and and use `outgoingUpdate` to update those PUBLSIH items to next state (say PUBREL), so `outgoing` array should not contain PUBLISH, and that's why this issue could be fixed by a check `packet.cmd !== 'publish'`
    gnought committed Jul 15, 2019
    Configuration menu
    Copy the full SHA
    57fc0f7 View commit details
    Browse the repository at this point in the history
  4. Removed console.log

    gnought committed Jul 15, 2019
    Configuration menu
    Copy the full SHA
    095ebca View commit details
    Browse the repository at this point in the history