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

Unified Diff: net/tools/quic/quic_client.cc

Issue 994193002: Compile quic_server on MacOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: net/tools/quic/quic_client.cc
diff --git a/net/tools/quic/quic_client.cc b/net/tools/quic/quic_client.cc
index 15efa56502674166923b52a9501c35d689306971..4c8386a4dc630773f7e0d25e8fad5ba3a8f3a5ba 100644
--- a/net/tools/quic/quic_client.cc
+++ b/net/tools/quic/quic_client.cc
@@ -120,11 +120,10 @@ QuicPacketWriter* QuicClient::DummyPacketWriterFactory::Create(
bool QuicClient::CreateUDPSocket() {
int address_family = server_address_.GetSockAddrFamily();
- fd_ = socket(address_family, SOCK_DGRAM | SOCK_NONBLOCK, IPPROTO_UDP);
- if (fd_ < 0) {
- LOG(ERROR) << "CreateSocket() failed: " << strerror(errno);
- return false;
- }
+ fd_ = QuicSocketUtils::CreateNonBlockingSocket(address_family, SOCK_DGRAM,
+ IPPROTO_UDP);
+ if (fd_ < 0)
+ return false; // failure already logged
Ryan Hamilton 2015/03/12 03:34:38 nit: We use {}s in one-line ifs for code that's sh
dougk 2015/03/12 12:39:10 Done.
int get_overflow = 1;
int rc = setsockopt(fd_, SOL_SOCKET, SO_RXQ_OVFL, &get_overflow,

Powered by Google App Engine
This is Rietveld 408576698