Return-Path: X-Original-To: apmail-curator-commits-archive@minotaur.apache.org Delivered-To: apmail-curator-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 73F0018148 for ; Mon, 28 Dec 2015 15:12:15 +0000 (UTC) Received: (qmail 76279 invoked by uid 500); 28 Dec 2015 15:12:14 -0000 Delivered-To: apmail-curator-commits-archive@curator.apache.org Received: (qmail 76223 invoked by uid 500); 28 Dec 2015 15:12:14 -0000 Mailing-List: contact commits-help@curator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@curator.apache.org Delivered-To: mailing list commits@curator.apache.org Received: (qmail 75849 invoked by uid 99); 28 Dec 2015 15:12:14 -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, 28 Dec 2015 15:12:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id F13A7E0497; Mon, 28 Dec 2015 15:12:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: randgalt@apache.org To: commits@curator.apache.org Date: Mon, 28 Dec 2015 15:12:14 -0000 Message-Id: <293555260438414a915971f867847f5e@git.apache.org> In-Reply-To: <863f8e26a7954dc2a6826b63dae5c7e3@git.apache.org> References: <863f8e26a7954dc2a6826b63dae5c7e3@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/2] curator git commit: Don't queue background operation if the client is closed Don't queue background operation if the client is closed Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/8dff2d7c Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/8dff2d7c Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/8dff2d7c Branch: refs/heads/CURATOR-209 Commit: 8dff2d7cf69f21fdc42e31fb33feed990915fcc7 Parents: 9b68e19 Author: randgalt Authored: Mon Dec 28 10:11:55 2015 -0500 Committer: randgalt Committed: Mon Dec 28 10:11:55 2015 -0500 ---------------------------------------------------------------------- .../org/apache/curator/framework/imps/CuratorFrameworkImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/curator/blob/8dff2d7c/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java ---------------------------------------------------------------------- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java index 38ce166..9c017d0 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java @@ -533,7 +533,10 @@ public class CuratorFrameworkImpl implements CuratorFramework void queueOperation(OperationAndData operationAndData) { - backgroundOperations.offer(operationAndData); + if ( getState() == CuratorFrameworkState.STARTED ) + { + backgroundOperations.offer(operationAndData); + } } void logError(String reason, final Throwable e)