[go: up one dir, main page]

P2p: Add a file descriptor pool

What

Add an Lwt_pool to allow limitation the number of simultaneously opened connections.

Why

To avoid file descriptors leak. It is a preparation for !16350 which uses this pool in the DAL node to have an option controling the number of connections.

How

An element of the pool is taken when a file descriptor is created, and is released when this file_descriptor is destroyed.

Manually testing the MR

Testing directly this merge request is quite hard, since it provide the ability to have a pool, but never create one. Testing only comes with !16350.

Merge request reports

Loading