X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Fdaemons%2Fhttp_getter%2Fmain.ml;fp=helm%2Fsoftware%2Fdaemons%2Fhttp_getter%2Fmain.ml;h=199a8b463f5920e66eaee3ff8681b12a1b494e73;hb=9571f24af9d981219cac993604997f80bb2e1b97;hp=572e9de1b932419203400a630186111002fec218;hpb=014181f92398c4935857568a1586113fac9d0e36;p=helm.git diff --git a/helm/software/daemons/http_getter/main.ml b/helm/software/daemons/http_getter/main.ml index 572e9de1b..199a8b463 100644 --- a/helm/software/daemons/http_getter/main.ml +++ b/helm/software/daemons/http_getter/main.ml @@ -263,7 +263,7 @@ let respond_xslt patch_xslt xslt_name outchan = (* thread action *) -let callback ((req: Http_types.request), outchan) = +let callback (req: Http_types.request) outchan = try Http_getter_logger.log ("Connection from " ^ req#clientAddr); Http_getter_logger.log ("Received request: " ^ req#uri); @@ -334,11 +334,6 @@ let callback ((req: Http_types.request), outchan) = log_failure msg; return_html_error ("uncaught_exception", msg) msg outchan) -let callback req outchan = - HExtlib.finally - (fun () -> try close_out outchan with Sys_error _ -> ()) - callback (req, outchan) - let batch_update = ref false let args = [ ] @@ -354,6 +349,7 @@ let main () = let d_spec = Http_daemon.daemon_spec ~mode:`Thread ~timeout:(Some 600) ~port:(Lazy.force Http_getter_env.port) + ~auto_close:true ~callback:callback () in try