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

Better shutdown handling #167

Merged
merged 5 commits into from May 6, 2017
Merged

Better shutdown handling #167

merged 5 commits into from May 6, 2017

Conversation

djfarrelly
Copy link
Member

@djfarrelly djfarrelly commented May 6, 2017

Purpose

Originally intended to fix #156 after testing #157 and it wasn't working during my local debugging. This now handles and destroys all open socket connections which makes the web server shut down immediately.

Notes

This also has other improvements around the Docker image and some items that I should have fixed long ago.
More insight into the connection handling here: nodejs/node#2642

Review

Hey @jsonxr and @donut87, this should fix #156 up! Would love to see if you had any comments or feedback for this!

Close all open connection sockets when the server is shut down. Some
connections are kept open with the keep-alive header or via websockets.
This allows us to quickly shutdown the server.

More info: nodejs/node#2642
This will be easier to maintain and also upgrades Node.js while keeping
the size similar.
@codecov
Copy link

codecov bot commented May 6, 2017

Codecov Report

Merging #167 into master will decrease coverage by 3.24%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #167      +/-   ##
==========================================
- Coverage   60.72%   57.47%   -3.25%     
==========================================
  Files           7        7              
  Lines         499      515      +16     
  Branches      106      106              
==========================================
- Hits          303      296       -7     
- Misses        196      219      +23
Impacted Files Coverage Δ
lib/web.js 67.27% <45%> (-1.02%) ⬇️
index.js 75% <75%> (+1.47%) ⬆️
lib/mailserver.js 64.58% <0%> (-7.5%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 77392ac...4281c19. Read the comment docs.

@djfarrelly
Copy link
Member Author

Merged PR despite build failure - Planning to drop support of Node 0.10 and 0.12 😉

@djfarrelly djfarrelly merged commit 1f93888 into master May 6, 2017
@djfarrelly djfarrelly deleted the fix/handle-siginit branch May 6, 2017 22:58
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.

Does not process SIGINT properly
1 participant