X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fdaemons%2Fgraphs%2Ftools%2FuriSetQueue.ml;h=e55fcd2142fee8256d9008c45116665005630828;hb=9571f24af9d981219cac993604997f80bb2e1b97;hp=9c94d4e9a18a4461a2f678fc59711238f8e7fbdb;hpb=014181f92398c4935857568a1586113fac9d0e36;p=helm.git diff --git a/helm/software/daemons/graphs/tools/uriSetQueue.ml b/helm/software/daemons/graphs/tools/uriSetQueue.ml index 9c94d4e9a..e55fcd214 100644 --- a/helm/software/daemons/graphs/tools/uriSetQueue.ml +++ b/helm/software/daemons/graphs/tools/uriSetQueue.ml @@ -76,7 +76,7 @@ let queue_mem item queue = (* mem function over queues *) with Found -> true ;; -let callback ((req: Http_types.request), outchan) = +let callback (req: Http_types.request) outchan = try let res = new Http_response.response () in res#addBasicHeaders; @@ -181,18 +181,11 @@ let callback ((req: Http_types.request), outchan) = outchan in -let callback req ch = - HExtlib.finally - (fun () -> try close_out ch with Sys_error _ -> ()) - callback (req, ch) - -in - Helm_registry.load_from configuration_file; let port = Helm_registry.get_int "uri_set_queue.port" in printf "%s started and listening on port %d\n" daemon_name port; flush stdout; -let d_spec = Http_daemon.daemon_spec ~port ~mode:`Thread ~callback () in +let d_spec = Http_daemon.daemon_spec ~port ~mode:`Thread ~auto_close:true ~callback () in Http_daemon.main d_spec; printf "%s is terminating, bye!\n" daemon_name