[hunchentoot-devel] updated version

Bill St. Clair billstclair at gmail.com
Tue Oct 27 13:52:08 UTC 2009


For me, STOP returns, but the listener process doesn't exit. To make
it do so in CCL, I've used the following. Haven't tried this in other
lisps. The full drakma:http-request is probably not necessary, just
something sent over the port to wake up the listener process. But I
haven't tried that either.

-Bill

              (let ((started nil))
                (process-run-function
                 (format nil "Stop port ~d" port)
                 (lambda ()
                   (setq started t)
                   (hunchentoot:stop acceptor)))
                (process-wait "Server stopper" (lambda () started)))
              ;; Need to make a request in order to get the server to shut down
              (ignore-errors
                (let ((ssl-p (hunchentoot:ssl-p acceptor)))
                  (dotimes (i 3)
                    (drakma:http-request
                     (format nil "~a://localhost:~d/"
                             (if ssl-p "https" "http") port)
                     :redirect nil)))))))))

On Tue, Oct 27, 2009 at 9:32 AM, Edi Weitz <edi at agharta.de> wrote:
> On Tue, Oct 27, 2009 at 12:57 PM, John Thingstad <jpthing at online.no> wrote:
>
>> Depends. The 1.0 version contains obvious errors like stop doesn't work.
>
> STOP doesn't work?  The acceptor will still accept requests after you
> called STOP?  Or what is the problem?
>
> And which other errors are you talking about?
>
> _______________________________________________
> tbnl-devel site list
> tbnl-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel
>




More information about the Tbnl-devel mailing list