From: Claudio Sacerdoti Coen Date: Mon, 29 May 2006 17:13:03 +0000 (+0000) Subject: ensure connections get closed after having been served X-Git-Tag: 0.4.95@7852~1407 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=5740d19b557e3ebef620017bbd85bdea22dda28c;p=helm.git ensure connections get closed after having been served --- diff --git a/daemons/proofChecker/proofChecker.ml b/daemons/proofChecker/proofChecker.ml index e4f00fe3a..c4a6391cc 100644 --- a/daemons/proofChecker/proofChecker.ml +++ b/daemons/proofChecker/proofChecker.ml @@ -92,7 +92,7 @@ let _ = flush !outchan) ;; -let callback (req : Http_types.request) outchan' = +let callback ((req : Http_types.request), outchan') = match req#path with | "/proofCheck" -> begin @@ -125,6 +125,13 @@ let callback (req : Http_types.request) outchan' = in +let callback req ch = + HExtlib.finally + (fun () -> try close_out ch with Sys_error _ -> ()) + callback (req, ch) + +in + printf "Proof Checker started and listening on port %d\n" port; flush stdout; CicEnvironment.set_trust (fun _ -> false);