Take the 2-minute tour ×

I open a socket and try to connect() to non-existent peer. The connect() is non blocking.

Then I epoll on the socket.

Sometimes I get EPOLLERR|EPOLLHUP events and subsequent getsockopt(SO_ERROR) returns ECONNREFUSED. Which is what I would expect.

However, sometimes I get EPOLLHUP alone and subsequent getsockopt(SO_ERROR) returns 0.

Anyone any idea what the latter case is supposed to mean?

share|improve this question

Your Answer



Browse other questions tagged or ask your own question.