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

Unified Diff: runtime/bin/socket_impl.dart

Issue 9837060: Treat EAGAIN/EWOULDBLOCK as requests for retry on socket accept. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove error printing 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
« no previous file with comments | « runtime/bin/socket.cc ('k') | runtime/bin/socket_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_impl.dart
diff --git a/runtime/bin/socket_impl.dart b/runtime/bin/socket_impl.dart
index 3a8ecd9027e6c3cec89dafbd101c3fc8fbabae89..a0b5d563253dc3dcb1bafbe2afbff5895860e91e 100644
--- a/runtime/bin/socket_impl.dart
+++ b/runtime/bin/socket_impl.dart
@@ -292,8 +292,12 @@ class _ServerSocket extends _SocketBase implements ServerSocket {
var result = _accept(socket);
if (result is OSError) {
_reportError(result, "Accept failed");
- } else {
+ } else if (result) {
_clientConnectionHandler(socket);
+ } else {
+ // Temporary failure accepting the connection. Ignoring
+ // temporary failures lets us retry when we wake up with data
+ // on the listening socket again.
}
}
}
« no previous file with comments | « runtime/bin/socket.cc ('k') | runtime/bin/socket_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698