Avoid sending an empty :attach port to reply

This was happening when the timeout was hit.
This commit is contained in:
Colin Jones 2012-02-23 18:12:39 -06:00
parent 03b8635c67
commit e45bc71473

View file

@ -51,7 +51,9 @@ that of Leiningen."
(:repl-port project)
0))
(-> @lein-repl-server deref :ss .getLocalPort)))))
(reply/launch-nrepl
(merge
{:attach (str (nrepl.ack/wait-for-ack (:repl-timeout project 30000)))}
(:reply-options project)))))
(if-let [repl-port (nrepl.ack/wait-for-ack (:repl-timeout project 30000))]
(reply/launch-nrepl
(merge
{:attach (str repl-port)}
(:reply-options project)))
(println "REPL server launch timed out."))))