EINPROGRESS for sendmsg() means it's working OK

--HG--
branch : fastopen
This commit is contained in:
Matt Johnston 2015-02-27 00:02:48 +08:00
parent 2a90c1ca7e
commit 843953379c

View File

@ -103,7 +103,7 @@ static void connect_try_next(struct dropbear_progress_connection *c) {
message.msg_iov = packet_queue_to_iovec(c->writequeue, &iovlen); message.msg_iov = packet_queue_to_iovec(c->writequeue, &iovlen);
message.msg_iovlen = iovlen; message.msg_iovlen = iovlen;
res = sendmsg(c->sock, &message, MSG_FASTOPEN); res = sendmsg(c->sock, &message, MSG_FASTOPEN);
if (res < 0) { if (res < 0 && errno != EINPROGRESS) {
/* Not entirely sure which kind of errors are normal - 2.6.32 seems to /* Not entirely sure which kind of errors are normal - 2.6.32 seems to
return EPIPE for any (nonblocking?) sendmsg(). just fall back */ return EPIPE for any (nonblocking?) sendmsg(). just fall back */
TRACE(("sendmsg tcp_fastopen failed, falling back. %s", strerror(errno))); TRACE(("sendmsg tcp_fastopen failed, falling back. %s", strerror(errno)));