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

Unified Diff: runtime/bin/socket_macos.cc

Issue 12316036: Merge IO v2 branch to bleeding edge (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased to r18818 Created 7 years, 10 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_linux.cc ('k') | runtime/bin/socket_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_macos.cc
diff --git a/runtime/bin/socket_macos.cc b/runtime/bin/socket_macos.cc
index 06422c4aba728dac753e0b6d0a999855ace261c5..50ad16ffaa1209564a1e3f1b9f079f569f6c9410 100644
--- a/runtime/bin/socket_macos.cc
+++ b/runtime/bin/socket_macos.cc
@@ -200,10 +200,7 @@ intptr_t ServerSocket::CreateBindListen(const char* host,
}
fd = TEMP_FAILURE_RETRY(socket(AF_INET, SOCK_STREAM, 0));
- if (fd < 0) {
- Log::PrintErr("Error CreateBind: %s\n", strerror(errno));
- return -1;
- }
+ if (fd < 0) return -1;
FDUtils::SetCloseOnExec(fd);
@@ -221,12 +218,11 @@ intptr_t ServerSocket::CreateBindListen(const char* host,
reinterpret_cast<struct sockaddr *>(&server_address),
sizeof(server_address))) < 0) {
VOID_TEMP_FAILURE_RETRY(close(fd));
- Log::PrintErr("Error Bind: %s\n", strerror(errno));
return -1;
}
- if (TEMP_FAILURE_RETRY(listen(fd, backlog)) != 0) {
- Log::PrintErr("Error Listen: %s\n", strerror(errno));
+ if (TEMP_FAILURE_RETRY(listen(fd, backlog > 0 ? backlog : SOMAXCONN)) != 0) {
+ TEMP_FAILURE_RETRY(close(fd));
return -1;
}
« no previous file with comments | « runtime/bin/socket_linux.cc ('k') | runtime/bin/socket_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698