[go: up one dir, main page]

p2p: Set cloexec to true for incoming connections

Context

In !8946 (merged), during the tezt test Test expected_peer_id some incoming connections are not closing well. This is due to file descriptors associated to incoming connections that are not closed in child processes.

This MR factorizes code of welcome worker and some tests with the code in P2p_fd module. It sets CLOEXEC to true for file descriptor related to:

  • incoming connections and
  • welcome worker listening socket.

Manually testing the MR

dune runtest src/lib_p2p/

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Vivien Pelletier

Merge request reports

Loading