properly close tcp connections on CLOSE_WAIT