handle EINTR in tcp server thread