Index: runtime/bin/eventhandler_linux.cc |
diff --git a/runtime/bin/eventhandler_linux.cc b/runtime/bin/eventhandler_linux.cc |
index 5eb2c88530ce988a31c7784a5a10efba1dc642e4..2037fccd6060a9e26837495c91a8b88ada263462 100644 |
--- a/runtime/bin/eventhandler_linux.cc |
+++ b/runtime/bin/eventhandler_linux.cc |
@@ -142,13 +142,10 @@ void EventHandlerImplementation::UpdateEpollInstance(intptr_t old_mask, |
RemoveFromEpollInstance(epoll_fd_, di); |
} else if (old_mask == 0 && new_mask != 0) { |
AddToEpollInstance(epoll_fd_, di); |
- } else if (old_mask != 0 && new_mask != 0) { |
- if (di->IsListeningSocket()) { |
- ASSERT(old_mask == new_mask); |
- } else { |
- RemoveFromEpollInstance(epoll_fd_, di); |
- AddToEpollInstance(epoll_fd_, di); |
- } |
+ } else if (old_mask != 0 && new_mask != 0 && old_mask != new_mask) { |
+ ASSERT(!di->IsListeningSocket()); |
+ RemoveFromEpollInstance(epoll_fd_, di); |
+ AddToEpollInstance(epoll_fd_, di); |
} |
} |