mirror of
https://github.com/metosin/reitit.git
synced 2025-12-17 00:11:11 +00:00
Call :stop for controllers in reverse order
This commit is contained in:
parent
5abdb74424
commit
9d6b0071fc
2 changed files with 2 additions and 2 deletions
|
|
@ -33,7 +33,7 @@
|
|||
(pad-same-length new-controllers old-controllers))
|
||||
(keep identity)
|
||||
vec)]
|
||||
(doseq [controller (map :old changed-controllers)]
|
||||
(doseq [controller (reverse (map :old changed-controllers))]
|
||||
(apply-controller controller :stop))
|
||||
(doseq [controller (map :new changed-controllers)]
|
||||
(apply-controller controller :start))
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
(swap! controller-state rfc/apply-controllers
|
||||
{:data {:controllers []}})
|
||||
|
||||
(is (= [:stop-1 [:stop-3 1]] @log))
|
||||
(is (= [[:stop-3 1] :stop-1] @log))
|
||||
(is (= [] @controller-state))
|
||||
(reset! log []))
|
||||
))
|
||||
|
|
|
|||
Loading…
Reference in a new issue