-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Update listen backlog on reload and stop enforcing default backlog #12977
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -278,6 +278,7 @@ static int fpm_sockets_get_listening_socket(struct fpm_worker_pool_s *wp, struct | |
|
||
sock = fpm_sockets_hash_op(0, sa, 0, wp->listen_address_domain, FPM_GET_USE_SOCKET); | ||
if (sock >= 0) { | ||
listen(sock, wp->config->listen_backlog); /* change backlog via listen() */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For correctness we should check the return value of listen even though it is unlikely to fail. This is actually good to verify the we got a correct socket. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be also good to have a test that does reload and changes the configuration to make that covered. |
||
return sock; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably verify why this is an issue for ondemand mode and test it with lower listen backlog. This was added together with ondemand mode from checking the changes so there might be a reason for adding it. There should be also a test added for setting it low and using ondemand. I would prefer to separate it to a new PR as it's unrelated to other change.