Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
proton-c-0.31.0
-
None
Description
Separation of responsibility of closing a file descriptor (which could generate an event) and registering/deregistering it within epoll (to watch for or ignore events) was strong in the previous proactor version. Rationalizing the data structures for space efficiency and overall clarity obscured this in the new version, and the removal of a "duplicate" fd reference made it possible to forget the fd to close.
From inspection, a simple short term fix is to remember the fd that is being leaked and close it when suitable.
The longer term fix should perhaps rationalize the current async nature of start_polling() and stop_polling() and serialize it through the new scheduler mechanism in the newer epoll proactor implementation.