Lwt-unix: Fix file descriptor leak with Lwt_unix.shutdown#81
Lwt-unix: Fix file descriptor leak with Lwt_unix.shutdown#81francoisthire wants to merge 1 commit intoanmonteiro:masterfrom
Lwt_unix.shutdown#81Conversation
|
it makes sense, but can you reproduce the fix in lwt_io faithfully? we shouldn't be using |
86c0782 to
42ad767
Compare
|
I have force-pushed the commit mimicking the lwt_io function. I believe that for this particular case it does not change anything since the |
I agree but it required going looking for the implementation to know. That shouldn’t be required. |
|
@anmonteiro What is the next step to unblock this? Let me know if I can do anything to help! |
@anmonteiro the |
I stumbled across a case where the syscall
shutdownof my application failed withENOTCONNand the syscall toclosedid not occur resulting into a file descriptor leak.By looking at the potential culprit, I found the shutdown function of this library.
The patch is inspired to what is done in lwt_io:
(for reference, another similar MR: ocsigen/lwt_ssl#5)