Index: runtime/bin/eventhandler_linux.cc |
diff --git a/runtime/bin/eventhandler_linux.cc b/runtime/bin/eventhandler_linux.cc |
index ea62bd5b1a4cd47c0521384812f3cf3ae37f6ccc..24e7755bd68aaa51894a97745d6db2b5e0be2a2f 100644 |
--- a/runtime/bin/eventhandler_linux.cc |
+++ b/runtime/bin/eventhandler_linux.cc |
@@ -362,13 +362,11 @@ void EventHandlerImplementation::HandleEvents(struct epoll_event* events, |
DescriptorInfo* di = |
reinterpret_cast<DescriptorInfo*>(events[i].data.ptr); |
const intptr_t old_mask = di->Mask(); |
- intptr_t event_mask = GetPollEvents(events[i].events, di); |
+ const intptr_t event_mask = GetPollEvents(events[i].events, di); |
if ((event_mask & (1 << kErrorEvent)) != 0) { |
di->NotifyAllDartPorts(event_mask); |
- } |
- event_mask &= ~(1 << kErrorEvent); |
- |
- if (event_mask != 0) { |
+ UpdateEpollInstance(old_mask, di); |
+ } else if (event_mask != 0) { |
Dart_Port port = di->NextNotifyDartPort(event_mask); |
ASSERT(port != 0); |
UpdateEpollInstance(old_mask, di); |