Allow modifying denylist without enforcement

This commit is contained in:
topjohnwu
2022-01-15 23:46:08 -08:00
parent c38b826abf
commit 76ddfeb93a
6 changed files with 100 additions and 100 deletions

View File

@@ -46,6 +46,9 @@ void register_poll(const pollfd *pfd, poll_callback callback) {
}
void unregister_poll(int fd, bool auto_close) {
if (fd < 0)
return;
if (gettid() == getpid()) {
// On main thread, directly modify
poll_map->erase(fd);