use SO_KEEPALIVE to detect hanging connections