-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-32567 Remove thr_alarm from server codebase - socket activation fix
Systemd socket activation cannot handle a shutdown on the file descriptor[1]. Enumerate past the socket activation descriptors. If there was no shutdown to trigger the breaking of the event loop, then write to the termination_event_fd that was setup during the socket activation code for this purpose. As abort_loop= true is already set at the top of break_connect_loop, and this is checked in loop before sockets are processed, no additional checking to read from the termination_event_fd is needed. Without socket activation defined, or used, termination_event_fd keeps its -1 default value. Close the eventfd outside the while loop so retries can happen if the write fails for some reason. ref[1]: https://www.freedesktop.org/software/systemd/man/latest/sd_listen_fds.html Reviewed by: Vladislav Vaintroub
- Loading branch information
1 parent
f8600b1
commit 6218b5f
Showing
2 changed files
with
43 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters