Skip to content

Commit

Permalink
Static linking: fail if main loop is run twice
Browse files Browse the repository at this point in the history
  • Loading branch information
balat committed May 11, 2024
1 parent 2ecf354 commit 6ed3173
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/server/ocsigen_server.ml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,11 @@ let site ?charset path instructions vh config_info parent_path =
in
Ocsigen_extensions.site_ext composite charset path

let main_loop_is_running = ref false

let main config =
if !main_loop_is_running then Lwt_log.ign_fatal "Cannot run main loop twice";
main_loop_is_running := true;
try
(* initialization functions for modules (Ocsigen extensions or application
code) loaded from now on will be executed directly. *)
Expand Down

0 comments on commit 6ed3173

Please sign in to comment.