Does anyone have an idea why connect() would continue before the three-way handshake is finalized?
According to what I captured by tcpdump the client sends a [PSH,ACK] with data before sending the last ACK of the three-way handshake.
NO_DELAY option is used.
Connect code :
do {
r1 = connect(socketfd, addr->ai_addr, addr->ai_addrlen);
} while (r1 < 0 && errno == EINTR);