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

Making UDS error handling and recovery more robust. #189

Merged
merged 18 commits into from
Oct 1, 2020

Commits on Sep 28, 2020

  1. Storing path, stream and udsGracefulRestartRateLimit on `client…

    …` in constructor.
    
    Also using these in places where `options` was used.
    Danny Hermes committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    8d7fe2b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5eb2e19 View commit details
    Browse the repository at this point in the history
  3. Introduce trySetNewSocket() helper.

    This way we can retry using this helper.
    Danny Hermes committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    700fb83 View commit details
    Browse the repository at this point in the history
  4. Replacing switch statement with UDS_ERROR_CODES constant.

    This is in advance of a change that will allow these to be OS specific.
    Danny Hermes committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    ccc83e4 View commit details
    Browse the repository at this point in the history
  5. Using -code for check within UDS_ERROR_CODES.

    See https://nodejs.org/docs/latest-v12.x/api/errors.html
    for an example (in `error.errno`) explaining why error codes are
    negative.
    Danny Hermes committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    eef577c View commit details
    Browse the repository at this point in the history
  6. Using OS-specific error codes in udsErrors().

    Danny Hermes committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    9db6aa0 View commit details
    Browse the repository at this point in the history
  7. Factoring out udsErrorHandler() helper.

    Danny Hermes committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    46da650 View commit details
    Browse the repository at this point in the history
  8. Factoring out addUDSErrorHandler() helper.

    Danny Hermes committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    5d194ab View commit details
    Browse the repository at this point in the history
  9. Keeping around client.isChild so it can be re-used.

    Danny Hermes committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    a8845b2 View commit details
    Browse the repository at this point in the history
  10. Removing spurious empty line.

    Danny Hermes committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    23b6aaa View commit details
    Browse the repository at this point in the history
  11. Adding UDS recovery to Client.prototype.sendMessage.

    Danny Hermes committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    572cb0c View commit details
    Browse the repository at this point in the history
  12. Checking isChild / udsGracefulErrorHandling in `maybeAddUDSErrorH…

    …andler()`.
    Danny Hermes committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    0fc3a68 View commit details
    Browse the repository at this point in the history
  13. Modifying udsErrorHandler() to check truthy socket.

    This way `this.socket` is only replaced if `createTransport()`
    returned an actual socket (vs. `null`).
    Danny Hermes committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    7b36227 View commit details
    Browse the repository at this point in the history
  14. Remove spurious space between ! and var.

    Danny Hermes committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    7cf8ad8 View commit details
    Browse the repository at this point in the history
  15. Adding explicit import for process.

    Danny Hermes committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    1e364f5 View commit details
    Browse the repository at this point in the history
  16. Adding JSDoc to newly added code.

    See: https://travis-ci.org/github/brightcove/hot-shots/jobs/730354851
    
    This was due to `eslint` failures. Also changed some `==` to `===`
    and added / removed some `;` in lines that needed / didn't need.
    Danny Hermes committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    15e9eb1 View commit details
    Browse the repository at this point in the history
  17. Fixing this -> client reference.

    This "bug" was introduced to my bugfix in a re-factor.
    Danny Hermes committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    f3d3fd6 View commit details
    Browse the repository at this point in the history
  18. Changing unit test hardcoded references to 107/111.

    dhermes authored and Danny Hermes committed Sep 28, 2020
    Configuration menu
    Copy the full SHA
    884c980 View commit details
    Browse the repository at this point in the history