Skip to content

Commit 800ee42

Browse files
Juanlu Herrerometa-codesync[bot]
authored andcommitted
c++|be|iouringbackend| remove events from signals correctly
Summary: remove the entries from the set of signals. If we out are entries, then remove the signal and then notifications be disabled. Reviewed By: spikeh Differential Revision: D92343898 fbshipit-source-id: 86fc968c8fadd81fa47c6607868eedb101376c83
1 parent 8f882e0 commit 800ee42

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

folly/io/async/IoUringBackend.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,11 @@ void IoUringBackend::removeSignalEvent(Event& event) {
899899
auto* ev = event.getEvent();
900900
auto iter = signals_.find(ev->ev_fd);
901901
if (iter != signals_.end()) {
902-
getSignalRegistry().setNotifyFd(ev->ev_fd, -1);
902+
iter->second.erase(&event);
903+
if (iter->second.empty()) {
904+
signals_.erase(iter);
905+
getSignalRegistry().setNotifyFd(ev->ev_fd, -1);
906+
}
903907
}
904908
}
905909

0 commit comments

Comments
 (0)