I open the socket and try to connect () to a nonexistent peer. The connect () function is not blocked.
Then I epoll on the socket.
Sometimes I get EPOLLERR | EPOLLHUP and subsequent getockopt (SO_ERROR) returns ECONNREFUSED. This is what I would expect.
However, sometimes I get only EPOLLHUP and the subsequent getockopt (SO_ERROR) returns 0.
Does anyone know what is meant in the latter case?
source
share