summaryrefslogtreecommitdiff
path: root/lib/system
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system')
-rw-r--r--lib/system/fastopen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/system/fastopen.c b/lib/system/fastopen.c
index 1c785e3f9b..c8655958d4 100644
--- a/lib/system/fastopen.c
+++ b/lib/system/fastopen.c
@@ -55,7 +55,7 @@ tfo_send(gnutls_transport_ptr_t ptr, const void *buf, size_t len)
int ret;
ret = connect(fd, (struct sockaddr*)&p->connect_addr, p->connect_addrlen);
- if (errno == ENOTCONN || errno == EINPROGRESS) {
+ if (ret == -1 && (errno == EINPROGRESS)) {
gnutls_assert();
errno = EAGAIN;
}