Skip to content

Commit fce2fd8

Browse files
kachayevztellman
authored andcommitted
Use defonce to prevent rebinding of thread locals (#438)
1 parent e109fcf commit fce2fd8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/aleph/http/server.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@
7373

7474
;;;
7575

76-
(def ^FastThreadLocal date-format (FastThreadLocal.))
77-
(def ^FastThreadLocal date-value (FastThreadLocal.))
76+
(defonce ^FastThreadLocal date-format (FastThreadLocal.))
77+
(defonce ^FastThreadLocal date-value (FastThreadLocal.))
7878

7979
(defn rfc-1123-date-string []
8080
(let [^DateFormat format

0 commit comments

Comments
 (0)