Index: runtime/bin/eventhandler_android.cc |
diff --git a/runtime/bin/eventhandler_android.cc b/runtime/bin/eventhandler_android.cc |
index 5dc4f7e387c28f7dbe3769ebbe99dec03355adc4..b84cfc64f8f28175e70de11bd92328cf2405c09d 100644 |
--- a/runtime/bin/eventhandler_android.cc |
+++ b/runtime/bin/eventhandler_android.cc |
@@ -133,13 +133,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); |
} |
} |