Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ADF6F10F8D for ; Thu, 27 Mar 2014 18:57:29 +0000 (UTC) Received: (qmail 85374 invoked by uid 500); 27 Mar 2014 18:57:29 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 85195 invoked by uid 500); 27 Mar 2014 18:57:27 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 85059 invoked by uid 99); 27 Mar 2014 18:57:26 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Mar 2014 18:57:26 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id EE50D894CF3; Thu, 27 Mar 2014 18:57:25 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mishail@apache.org To: commits@cassandra.apache.org Date: Thu, 27 Mar 2014 18:57:26 -0000 Message-Id: <5d27e27a9df54f46bb98e44d01e78bb5@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/3] git commit: Ninja: don't close the connection you don't own (after SOURCE command) Ninja: don't close the connection you don't own (after SOURCE command) Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/20bc9246 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/20bc9246 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/20bc9246 Branch: refs/heads/trunk Commit: 20bc92463a59699ee31b766440820123d5ba5e2b Parents: 48e8dcc Author: Mikhail Stepura Authored: Thu Mar 27 11:56:32 2014 -0700 Committer: Mikhail Stepura Committed: Thu Mar 27 11:56:32 2014 -0700 ---------------------------------------------------------------------- bin/cqlsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/20bc9246/bin/cqlsh ---------------------------------------------------------------------- diff --git a/bin/cqlsh b/bin/cqlsh index aa19c4d..d7025cf 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -480,6 +480,7 @@ class Shell(cmd.Cmd): auth_provider=self.auth_provider, ssl_options=sslhandling.ssl_settings(hostname, CONFIG_FILE) if ssl else None, load_balancing_policy=WhiteListRoundRobinPolicy([self.hostname])) + self.owns_connection = not use_conn self.set_expanded_cql_version(cqlver) if keyspace: @@ -1624,7 +1625,8 @@ class Shell(cmd.Cmd): Exits cqlsh. """ self.stop = True - self.conn.shutdown() + if self.owns_connection: + self.conn.shutdown() do_quit = do_exit def do_debug(self, parsed):