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

Explicitly close HTTP server to avoid process.exit #42

Merged
merged 1 commit into from
Dec 1, 2017

Commits on Dec 1, 2017

  1. fix: Explicitly close HTTP server to avoid process.exit

    Using `process.exit` directly can cause output to stderr/stdout to be
    truncated, since it
    [does not wait for output to streams to be sent](https://nodejs.org/api/process.html#process_process_exit_code).
    
    This probably isn't an issue here for the PIP service, but it's worth
    avoiding it since explicitly closing the HTTP server created by express
    is easy, and will cause the process to quit "naturally", as nothing else
    is running.
    
    We did actually run into this issue in the [fuzzy-tester](pelias/fuzzy-tester#44)
    and it's a pain to track down.
    orangejulius committed Dec 1, 2017
    Configuration menu
    Copy the full SHA
    f1f2cf2 View commit details
    Browse the repository at this point in the history