Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 323BC200BFE for ; Mon, 16 Jan 2017 14:17:20 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 2F3A5160B30; Mon, 16 Jan 2017 13:17:20 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6EB85160B22 for ; Mon, 16 Jan 2017 14:17:19 +0100 (CET) Received: (qmail 85758 invoked by uid 500); 16 Jan 2017 13:17:18 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 85741 invoked by uid 99); 16 Jan 2017 13:17:18 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jan 2017 13:17:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 333B8DFBFF; Mon, 16 Jan 2017 13:17:18 +0000 (UTC) From: eribeiro To: dev@zookeeper.apache.org Reply-To: dev@zookeeper.apache.org References: In-Reply-To: Subject: [GitHub] zookeeper pull request #150: ZOOKEEPER-2184: Zookeeper Client should re-reso... Content-Type: text/plain Message-Id: <20170116131718.333B8DFBFF@git1-us-west.apache.org> Date: Mon, 16 Jan 2017 13:17:18 +0000 (UTC) archived-at: Mon, 16 Jan 2017 13:17:20 -0000 Github user eribeiro commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/150#discussion_r96226819 --- Diff: src/java/main/org/apache/zookeeper/client/StaticHostProvider.java --- @@ -45,6 +45,9 @@ private int currentIndex = -1; + // Don't re-resolve on first next() call + private boolean connectedSinceNext = true; --- End diff -- My reasoning was only defensively, but on a 2nd look, it would be overkill. So, no problem without being volatile, imo. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---