Fixed infinite loop in try-port
This commit is contained in:
parent
867909cae2
commit
78f86118d7
|
@ -7,8 +7,10 @@
|
||||||
(if-not (sequential? port)
|
(if-not (sequential? port)
|
||||||
(run-server port)
|
(run-server port)
|
||||||
(try (run-server (first port))
|
(try (run-server (first port))
|
||||||
(catch Exception _
|
(catch Exception ex
|
||||||
(try-port (next port) run-server)))))
|
(if-let [port (next port)]
|
||||||
|
(try-port port run-server)
|
||||||
|
(throw ex))))))
|
||||||
|
|
||||||
(defn serve
|
(defn serve
|
||||||
"Start a web server to run a handler."
|
"Start a web server to run a handler."
|
||||||
|
|
Reference in a new issue