Commit d183ec23 authored by Nick Mathewson's avatar Nick Mathewson 🤹
Browse files

Call monotime_init() earlier.

We need to call it before nt_service_parse_options(), since
nt_service_parse_options() can call back into nt_service_main(),
which calls do_main_loop().

Fixes bug 21356; bugfix on 0.2.9.1-alpha.
parent 0d4d9b6d
Loading
Loading
Loading
Loading

changes/ticket21356

0 → 100644
+4 −0
Original line number Diff line number Diff line
  o Minor bugfixes (Windows services):
    - Be sure to initialize the monotonic time subsystem before using it,
      even when running as an NT service.
      Fixes bug 21356; bugfix on 0.2.9.1-alpha.
+1 −2
Original line number Diff line number Diff line
@@ -3443,6 +3443,7 @@ tor_main(int argc, char *argv[])
  update_approx_time(time(NULL));
  tor_threads_init();
  init_logging(0);
  monotime_init();
#ifdef USE_DMALLOC
  {
    /* Instruct OpenSSL to use our internal wrappers for malloc,
@@ -3476,8 +3477,6 @@ tor_main(int argc, char *argv[])
#endif
  }

  monotime_init();

  switch (get_options()->command) {
  case CMD_RUN_TOR:
#ifdef NT_SERVICE