[PATCH 2/2] Fix iteration of brokers at path /

Attila Lendvai attila at lendvai.name
Tue Jun 30 17:06:43 UTC 2015


hi Kami,

i've rolled back the session-count defgeneric stuff, but that patch
contains all kinds of unrelated (and not really convincing) changes.
although, one could argue that any accidentally recorded change
automatically smells fishy... :)

i've rolled back this one:

hunk ./source/application/application.lisp 88
-                              (when (typep el 'application)
-                                (incf sum (hash-table-count
(session-id->session-of el))))))
+                              (incf sum (session-count el))))


and these i don't have energy to check now, so i left them in as is,
hoping that it's well tested with the other related patches:

hunk ./source/application/application.lisp 39
+(def method call-if-matches-request ((app application) request thunk)
+  (let ((*application* app))
+    (call-next-method)))
+
+(def method handle-request ((app application) request)
+  (debug-only (assert (and (boundp '*broker-stack*) (eq (first
*broker-stack*) app))))
+  (let ((*application* app))
+    ;; tell ITERATE-BROKERS-FOR-RESPONSE to go on with a new set of brokers
+    (remove-if-not (lambda (ep) (typep ep 'broker)) (entry-points-of app))))
+


hunk ./source/server/brokers.lisp 84
-            (iterate-brokers-for-response visitor request
initial-brokers result (1+ recursion-depth))))
+            (iter (for broker :in result)
+                  (aif (iterate-brokers-for-response visitor request
initial-brokers (list broker) (1+ recursion-depth))
+                       (return (values it))))))

hunk ./source/server/brokers.lisp 154
-         (length-matches? (if (zerop broker-path-length)
+         (length-matches? (if (and broker-path (zerop broker-path-length))


note that recording these random changes into an unrelated patch now
makes it impossible for me to pull a fix of the .asd without also
pulling all the entry-point related changes. they may potentially
break the service and thus i wanted to leave them in HEAD and not pull
them to LIVE. please pay attention to this!

also note that adding two new dependencies to the .asd is a big
change. the websocket stuff should have gone into a separate asd
system, and i've done that.

please don't use such generic names like READ-HANDLE-LOOP in the
web-server package. either set up a separate package for the
subsystem, or avoid using potentially confusing names. i've recorded
separate patches that you can look at for more details.

the rest in the patches and on IRC,

-- 
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“If it can be destroyed by the truth, it deserves to be destroyed by the truth.”
	― Carl Sagan (1934–1996)



More information about the cl-dwim-devel mailing list