X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=daemons%2Frdfly%2Frdfly.ml;h=8dbb6b051c484a48101d68f590a3adeb18c87d75;hb=729b9103bd8783891f80ce6d7ea4c393a76b7ea8;hp=54c87b8d8a43a7481baee5833c25b54a87e41623;hpb=94eea46dcbe7a750cc9e9db0397f266886b70a15;p=helm.git diff --git a/daemons/rdfly/rdfly.ml b/daemons/rdfly/rdfly.ml index 54c87b8d8..8dbb6b051 100644 --- a/daemons/rdfly/rdfly.ml +++ b/daemons/rdfly/rdfly.ml @@ -152,7 +152,7 @@ let password = get_option "rdfly.mysql_connection.password";; let user = get_option "rdfly.mysql_connection.user";; let daemonport = Helm_registry.get_int "rdfly.port";; -let callback ((req: Http_types.request), ch) = +let callback (req: Http_types.request) ch = try debug_print ("Connection from " ^ req#clientAddr) ; debug_print ("Received request: " ^ req#uri) ; @@ -180,16 +180,11 @@ let callback ((req: Http_types.request), ch) = | exc -> return_html_error ("Uncaught exception: " ^ (Printexc.to_string exc)) ch -let callback req ch = - HExtlib.finally - (fun () -> try close_out ch with Sys_error _ -> ()) - callback (req, ch) - let main () = Sys.catch_break true; try let d_spec = - Http_daemon.daemon_spec ~timeout:(Some 600) ~port:daemonport ~callback () + Http_daemon.daemon_spec ~timeout:(Some 600) ~port:daemonport ~callback ~auto_close:true () in Http_daemon.main d_spec with Sys.Break -> ()