Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Unified Diff: runtime/bin/eventhandler_linux.cc

Issue 9720045: Extend dart:io error handling to all socket functions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix Mac OS and Windows compile Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/bin/eventhandler_linux.cc
diff --git a/runtime/bin/eventhandler_linux.cc b/runtime/bin/eventhandler_linux.cc
index 5ee2f84d69f020933430ee334064bd7797c02c21..0c45e1710953cbc43289e247e212034dcaac6aa4 100644
--- a/runtime/bin/eventhandler_linux.cc
+++ b/runtime/bin/eventhandler_linux.cc
@@ -262,7 +262,13 @@ intptr_t EventHandlerImplementation::GetPollEvents(intptr_t events,
if (FDUtils::AvailableBytes(sd->fd()) != 0) {
event_mask = (1 << kInEvent);
} else if (((events & EPOLLHUP) != 0)) {
Mads Ager (google) 2012/03/20 15:11:58 Remove one set of parenthesis?
Søren Gjesse 2012/03/21 09:33:36 Done.
- event_mask = (1 << kCloseEvent);
+ // If both EPOLLHUP and EPOLLERR are reported treat it as an
+ // error.
+ if (((events & EPOLLERR) != 0)) {
Mads Ager (google) 2012/03/20 15:11:58 Remove one set of parenthesis?
Søren Gjesse 2012/03/21 09:33:36 Done.
+ event_mask = (1 << kErrorEvent);
+ } else {
+ event_mask = (1 << kCloseEvent);
+ }
sd->MarkClosedRead();
} else if ((events & EPOLLERR) != 0) {
event_mask = (1 << kErrorEvent);

Powered by Google App Engine
This is Rietveld 408576698