Skip to content

[WIP] lib_p2p: wait cancellation on closing connection

Context

While closing a connection in P2p_io_scheduler, we do not wait the cancellation step to be over. This may lead to weird behaviours where we still read information on the file descriptor for no reasons.

The close time is a bit slower (from 0.00001 to 0.001000) but it should not ba an issue in practice.

This may also explains some errors that happens during Ctrl+C where some events cannot be printed because the event mechanism is closed before we close the fd with P2p_fd.close fd which was run asynchronously.

Manually testing the MR

Check the node still behave correctly.

Reviewers

@julien.t @vivienpe @vbotbol @pirbo @raphael-proust

Edited by François Thiré

Merge request reports