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: make_still_working~7304 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=b27a738af7c28848a7c1bbf1374abfff2288010b;p=helm.git ensure connections get closed after having been served --- diff --git a/helm/software/daemons/proofChecker/proofChecker.ml b/helm/software/daemons/proofChecker/proofChecker.ml index e4f00fe3a..c4a6391cc 100644 --- a/helm/software/daemons/proofChecker/proofChecker.ml +++ b/helm/software/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);