Skip to content
Browse files

put helpful metadata on clients and delimited-transport-seqs

  • Loading branch information...
1 parent c377dea commit 0ac39dc8d74c1750c1cadf3a3a29c2f114293e9e @cemerick cemerick committed Dec 10, 2012
Showing with 12 additions and 7 deletions.
  1. +12 −7 src/main/clojure/clojure/tools/nrepl.clj
View
19 src/main/clojure/clojure/tools/nrepl.clj
@@ -54,6 +54,7 @@
tracking-seq)]
(reset! latest-head [0 head])
head)]
+ ^{::transport transport ::timeout response-timeout}
(fn this
([] (or (second @latest-head)
(restart)))
@@ -70,13 +71,17 @@
(defn- delimited-transport-seq
[client termination-statuses delimited-slots]
- (comp (partial take-until (comp #(seq (clojure.set/intersection % termination-statuses))
- set
- :status))
- (let [keys (keys delimited-slots)]
- (partial filter #(= delimited-slots (select-keys % keys))))
- client
- #(merge % delimited-slots)))
+ (with-meta
+ (comp (partial take-until (comp #(seq (clojure.set/intersection % termination-statuses))
+ set
+ :status))
+ (let [keys (keys delimited-slots)]
+ (partial filter #(= delimited-slots (select-keys % keys))))
+ client
+ #(merge % delimited-slots))
+ (-> (meta client)
+ (update-in [::termination-statuses] (fnil into #{}) termination-statuses)
+ (update-in [::taking-until] merge delimited-slots))))
(defn message
"Sends a message via [client] with a fixed message :id added to it.

0 comments on commit 0ac39dc

Please sign in to comment.
Something went wrong with that request. Please try again.