Skip to content

Commit

Permalink
Sleep a little bit after starting & stopping a server.
Browse files Browse the repository at this point in the history
  • Loading branch information
fukamachi committed Dec 2, 2014
1 parent ff24507 commit 9804d0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/core/clack.lisp
Expand Up @@ -124,6 +124,7 @@ Example:
(*error-output* . ,(if (symbolp *clack-error-output*)
(symbol-value *clack-error-output*)
*clack-error-output*)))))))
(sleep 1)
(format t "~&~:(~A~) server is started.~
~%Listening on localhost:~A.~%" server port)
(when watch
Expand Down
4 changes: 3 additions & 1 deletion src/core/handler.lisp
Expand Up @@ -37,7 +37,9 @@
(stop-watching this)
(let ((acceptor (acceptor this)))
(if (bt:threadp acceptor)
(bt:destroy-thread acceptor)
(progn
(bt:destroy-thread acceptor)
(sleep 0.5))
(funcall (intern (string '#:stop) handler-package) acceptor))))))

(doc:start)
Expand Down

0 comments on commit 9804d0b

Please sign in to comment.