cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mish...@apache.org
Subject [2/3] git commit: Ninja: don't close the connection you don't own (after SOURCE command)
Date Thu, 27 Mar 2014 18:57:26 GMT
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 <mishail@apache.org>
Authored: Thu Mar 27 11:56:32 2014 -0700
Committer: Mikhail Stepura <mishail@apache.org>
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):


Mime
View raw message