Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Fixed authentication issue and performance issue after authenticated #124

merged 2 commits into from

2 participants


Fixed authentication issue when trying to set keyspace before authenticated mentioned here

Fixed performance issue of re-authenticating each time when ExecuteNonQuery calls to Session.GetClient()

@nberardi nberardi merged commit 31f5ab3 into from

Thank you for the pull request.


Welcome and thank you for actively maintaining this Cassandra driver as OSS project :+1:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/CassandraSession.cs
4 src/CassandraSession.cs
@@ -111,7 +111,7 @@ internal CassandraClientWrapper GetClient(bool setKeyspace = true, bool? setCqlV
if (setCqlVersion.Value)
- if (setLogin && !String.IsNullOrWhiteSpace(builder.Username) && !String.IsNullOrWhiteSpace(builder.Password))
+ if (!IsAuthenticated && setLogin && !String.IsNullOrWhiteSpace(builder.Username) && !String.IsNullOrWhiteSpace(builder.Password))
Login(builder.Username, builder.Password);
return new CassandraClientWrapper(_connection.Client);
@@ -149,7 +149,7 @@ public void Login(string username, string password)
- GetClient(setLogin: false).login(auth);
+ GetClient(setKeyspace: false, setLogin: false).login(auth);
IsAuthenticated = true;
catch (Exception exc)
Something went wrong with that request. Please try again.