BugZero found this defect 74 days ago.
Data sources
All data on this page is proprietary to BugZero® or gathered from public sources
3/12/2024
MongoDB Server
No affected releases provided.
No fixed releases provided.
AsioReactor uses the asio::io_context::poll method in AsioReactor::drain to flush remaining work during shutdown. The poll method only acts on immediately ready handlers, which means that drain can return while handlers that aren't immediately ready remain in the queue. Change the drain method to use the asio::io_context::run method instead, so that all work is drained. Note that the AsioReactor::run method creates an asio::io_context::work object before invoking asio::io_context::run. The effect of the work object is to change the behavior of run so that it blocks even when the handler queue is empty. Without the object, run will return as soon as all outstanding handlers are resolved.