lib/aerospike/connection/authenticate.rb in aerospike-2.21.0 vs lib/aerospike/connection/authenticate.rb in aerospike-2.21.1
- old
+ new
@@ -31,11 +31,11 @@
end
end
end
module AuthenticateNew
class << self
- INVALID_SESSION_ERR = [ResultCode::INVALID_CREDENTIAL,
+ INVALID_SESSION_ERR = [ResultCode::INVALID_CREDENTIAL,
ResultCode::EXPIRED_SESSION]
def call(conn, cluster)
command = LoginCommand.new
if !cluster.session_valid?
@@ -46,11 +46,11 @@
rescue => ae
# always reset session info on errors to be on the safe side
cluster.reset_session_info
if ae.is_a?(Exceptions::Aerospike)
if INVALID_SESSION_ERR.include?(ae.result_code)
- command.authenticate(conn, cluster)
+ command.authenticate_new(conn, cluster)
return
end
end
raise ae
end
@@ -63,5 +63,6 @@
end
end
end
end
end
+