Commits

Anonymous committed be4a6c7

debug closing

  • Participants
  • Parent commits b30abf6

Comments (0)

Files changed (1)

src/amall_http_server.ml

 = IO.run_and_ignore_result
    (let closed = ref False in
     let do_close () =
+      let () = dbg "http_server_func: close 0" in
       if closed.val
       then
         IO.return ()
         IO.catch
           (fun () ->
              let () = closed.val := True in
+             let () = dbg "http_server_func: close 1" in
              IO.close_in inch >>% fun () ->
-             IO.close_out outch
+             let () = dbg "http_server_func: close 1" in
+             IO.close_out outch >>% fun () ->
+             let () = dbg "http_server_func: close 1" in
+             IO.return ()
           )
           (fun e ->
             let () = dbg "http_server_func: close error: %s"