X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fdaemons%2Fgraphs%2Ftools%2FuriSetQueue.ml;fp=helm%2Fsoftware%2Fdaemons%2Fgraphs%2Ftools%2FuriSetQueue.ml;h=86bfe35f38c631237c402dddaa73cd4f428e4cbd;hb=9c62f882f0aa158c0954442fe544d85e68dd10c3;hp=43027580016fe58101457ccc8ae38398ff8f0e8c;hpb=4d195c3ad2400605ca79e9dc97b4808286de994d;p=helm.git diff --git a/helm/software/daemons/graphs/tools/uriSetQueue.ml b/helm/software/daemons/graphs/tools/uriSetQueue.ml index 430275800..86bfe35f3 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,6 +181,13 @@ 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;