Skip to content

Commit

Permalink
Change the starting message a little bit when use-thread is NIL.
Browse files Browse the repository at this point in the history
  • Loading branch information
fukamachi committed Jul 22, 2015
1 parent b418b21 commit 1e2502b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/clack.lisp
Expand Up @@ -38,10 +38,7 @@
(use-thread #+thread-support t #-thread-support nil)
(use-default-middlewares t)
&allow-other-keys)
(flet ((print-start-message ()
(unless silent
(format t "~&~:(~A~) server is started.~%Listening on localhost:~A.~%" server port)))
(buildapp (app)
(flet ((buildapp (app)
(let ((app (typecase app
((or pathname string)
(eval-file app))
Expand All @@ -51,12 +48,14 @@
:backtrace
nil)
app))))
(unless use-thread
(print-start-message))
(when (and (not use-thread)
(not silent))
(format t "~&~:(~A~) server is going to start.~%Listening on localhost:~A.~%" server port))
(prog1
(apply #'clack.handler:run (buildapp app) server
:port port
:debug debug
:use-thread use-thread
(delete-from-plist args :server :port :debug :silent :use-thread))
(print-start-message))))
(unless silent
(format t "~&~:(~A~) server is started.~%Listening on localhost:~A.~%" server port)))))

0 comments on commit 1e2502b

Please sign in to comment.