iostream: shutdown socket fd before close
If a socket fd is shared by a child process, closing it in the parent will not shut down the underlying connection. As a result, the server may hang executing the graceful shutdown protocol. Fix this problem by explicitly shutting down the connection socket fd before closing it. This is a recommended way to terminate a Unix socket connection, see http://www.faqs.org/faqs/unix-faq/socket/#:~:text=2.6.%20%20When%20should%20I%20use%20shutdown()%3F Closes #7256 NO_DOC=bug fix
Showing
- changelogs/unreleased/gh-7256-iostream-shutdown.md 6 additions, 0 deletionschangelogs/unreleased/gh-7256-iostream-shutdown.md
- src/lib/core/iostream.c 7 additions, 0 deletionssrc/lib/core/iostream.c
- test/box-luatest/graceful_shutdown_test.lua 15 additions, 0 deletionstest/box-luatest/graceful_shutdown_test.lua
Loading
Please register or sign in to comment