Use api now to destroy invalid sessions.

This commit is contained in:
Martin Edenhofer 2014-10-23 21:41:32 +02:00
parent 4be8f330b8
commit 5980a39ea0

View file

@ -142,7 +142,7 @@ returns
destroy session destroy session
Sessions.destory?(client_id) Sessions.destory(client_id)
returns returns
@ -227,7 +227,7 @@ returns
session_file = session_dir + '/session' session_file = session_dir + '/session'
data = nil data = nil
if !File.exist? session_file if !File.exist? session_file
FileUtils.rm_rf session_dir self.destory(client_id)
puts "ERROR: missing session file for '#{client_id.to_s}', remove session." puts "ERROR: missing session file for '#{client_id.to_s}', remove session."
return return
end end
@ -240,7 +240,7 @@ returns
} }
rescue Exception => e rescue Exception => e
puts e.inspect puts e.inspect
FileUtils.rm_rf session_dir self.destory(client_id)
puts "ERROR: reading session file '#{session_file}', remove session." puts "ERROR: reading session file '#{session_file}', remove session."
return return
end end