printf "%s started and listening on port %d\n" daemon_name port;
printf "current directory is %s\n" (Sys.getcwd ());
flush stdout;
-Http_daemon.start' ~port callback;
+let d_spec = Http_daemon.daemon_spec ~port ~callback () in
+Http_daemon.main d_spec;
printf "%s is terminating, bye!\n" daemon_name
let port = Helm_registry.get_int "uri_set_queue.port" in
printf "%s started and listening on port %d\n" daemon_name port;
flush stdout;
-Http_daemon.start' ~port ~mode:`Thread callback;
+let d_spec = Http_daemon.daemon_spec ~port ~mode:`Thread ~callback () in
+Http_daemon.main d_spec;
printf "%s is terminating, bye!\n" daemon_name