Adds handling of EPOLLHUP for server and client sockets