I create a non-blocking socket, and then use the epoll
to manange the socket. I do not set a timeout on epoll_wait
. But I find that the epoll
returned in 5s to 10s, then I check with the getsockopt
on SO_ERROR
, the connect find to be timed out. Why time out in so short time?
I try to use tools to cap the TCP packages. The scenario is like this:
When my client send a SYN
in order to connect to the server. But the server cannot send back the ACK
in 5s to 10s. Then the epoll_wait
return. and check with the SO_ERROR
. I get a EIMTEDOUT
.
I just cannot understand why the timeout time is so short in 5s to 10s. Is the problem of my client or is the epoll
?