(* 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);
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 = [ ]
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