lib/rack/session/mongo.rb in mongo-store-0.1.0 vs lib/rack/session/mongo.rb in mongo-store-0.1.1

- old
+ new

@@ -56,11 +56,11 @@ def initialize(app, options = {}) super @mutex = Mutex.new @connection = @default_options[:connection] || ::Mongo::Connection.new @pool = @connection.db(@default_options[:db]).collection(@default_options[:collection]) - @pool.create_index('sid', true) + @pool.create_index('sid', :unique => true) end def get_session(env, sid) @mutex.lock if env['rack.multithread'] session = find_session(sid) if sid @@ -142,6 +142,6 @@ return nil unless packed Marshal.load(packed.unpack("m*").first) end end end -end \ No newline at end of file +end