Thanks,
This code works for starting and stopping http servers, but it doesn't
work when the it uses websockets.
The connection continues to be open even after executing the shutdown
function.
Is there a way to make it work with websocket servers?
Thanks
On Sep 27, 3:45 am, "Sridhar Ratnakumar (srid)"
<
sridhar.ra...@gmail.com> wrote:
> On Sep 14, 3:44 pm, ztellman <
ztell...@gmail.com> wrote:
>
> > The value returned by start-http-server is a function that can be
> > called to stop the server.
>
> > (def s (start-http-server handler {:port 8080}))
> > (s) ;; stops the server
>
> To make this easy to control from the REPL (where `s` is not always
> available), I wrote this:
>
> (def server (atom nil))
>
> (defn initialize []
> (if @server
> (println "Warning: already initialized")
> (do
> (println "Startinghttp://localhost:8080/")