Permalink
Browse files

Merge pull request #124 from ssteo/master

Fixed authentication issue and performance issue after authenticated
  • Loading branch information...
2 parents 8c7bf03 + dcc948c commit 31f5ab362dddd0b14d54fcd74a61e04b5923e3c4 @nberardi nberardi committed Mar 20, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/CassandraSession.cs
View
4 src/CassandraSession.cs
@@ -111,7 +111,7 @@ internal CassandraClientWrapper GetClient(bool setKeyspace = true, bool? setCqlV
if (setCqlVersion.Value)
_connection.SetCqlVersion(builder.CqlVersion);
- 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)
try
{
- GetClient(setLogin: false).login(auth);
+ GetClient(setKeyspace: false, setLogin: false).login(auth);
IsAuthenticated = true;
}
catch (Exception exc)

0 comments on commit 31f5ab3

Please sign in to comment.