If close returns with -1 and errno is set to EINTR, the socket is still in an open state and the poco API will leak an fd. The return value for close needs to be checked and close retried if errno is EINTR. I haven't proven it yet, but I'm pretty sure I'm running into this with Poco 1.9.4 on Centos 7.