From 843953379c1f6ce56e993c82d97c268e31a86e6e Mon Sep 17 00:00:00 2001
From: Matt Johnston <matt@ucc.asn.au>
Date: Fri, 27 Feb 2015 00:02:48 +0800
Subject: [PATCH] EINPROGRESS for sendmsg() means it's working OK

--HG--
branch : fastopen
---
 netio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/netio.c b/netio.c
index d1a05f3a..9aa7ae51 100644
--- a/netio.c
+++ b/netio.c
@@ -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_iovlen = iovlen;
 			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 
 				return EPIPE for any (nonblocking?) sendmsg(). just fall back */
 				TRACE(("sendmsg tcp_fastopen failed, falling back. %s", strerror(errno)));
-- 
GitLab