Skip to content

Commit

Permalink
Maybe expire more than just one stupid session, kk?
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrossley3 committed Aug 21, 2014
1 parent cb88500 commit 6bdeae2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions web/src/immutant/web/internal/ring.clj
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@

(defn session-expirer
[timeout]
(let [d (delay timeout)]
(fn [session]
(when-not (realized? d)
(.setMaxInactiveInterval session @d))
session)))
(fn [session]
(when (not= timeout (.getMaxInactiveInterval session))
(.setMaxInactiveInterval session timeout))
session))

(def-map-type LazyMap [^java.util.Map m]
(get [_ k default-value]
Expand Down

0 comments on commit 6bdeae2

Please sign in to comment.