# HG changeset patch # User Matt Johnston # Date 1424965392 -28800 # Node ID e6c4cd0510d957af85dba277d1345f8174dc8eff # Parent 8ed1d37e75a6053dc7784df3d43593c317b6b5b8 ignore any sendmsg() errors diff -r 8ed1d37e75a6 -r e6c4cd0510d9 netio.c --- a/netio.c Sat Feb 21 00:43:32 2015 +0800 +++ b/netio.c Thu Feb 26 23:43:12 2015 +0800 @@ -103,8 +103,10 @@ message.msg_iov = packet_queue_to_iovec(c->writequeue, &iovlen); message.msg_iovlen = iovlen; res = sendmsg(c->sock, &message, MSG_FASTOPEN); - if (res < 0 && errno == EOPNOTSUPP) { - TRACE(("Fastopen not supported")); + if (res < 0) { + /* Not entirely sure which kind of errors are normal - 2.6.32 seems to + return EPIPE for any (nonblocking?) sendmsg(). just fall back */ + TRACE(("sendmsg tcp_fastopen failed, falling back. %s", strerror(errno))); /* No kernel MSG_FASTOPEN support. Fall back below */ fastopen = 0; /* Set to NULL to avoid trying again */