Merge pull request #5710 from lioncash/close

Common/Async: Handle fd closing a little better
This commit is contained in:
Ryan Houdek authored and GitHub committed 2026-07-11 11:03:10 -07:00
commit b750d6772f
1 file changed
+4 -1
+4 -1
View File
@@ -71,8 +71,10 @@ private:
public:
~poll_reactor() {
if (AsyncStopRequest[0]) {
if (AsyncStopRequest[0] != -1) {
::close(AsyncStopRequest[0]);
}
if (AsyncStopRequest[1] != -1) {
::close(AsyncStopRequest[1]);
}
}
@@ -92,6 +94,7 @@ public:
}
// Wake up run() thread by closing this pipe endpoint
::close(AsyncStopRequest[1]);
AsyncStopRequest[1] = -1;
}
void cleanup() {