Procházet zdrojové kódy

Make sure that we are always a net participant when being a server

Otherwise, if we're dormant, and we set ORPort, nothing makes us become
non-dormant.
Nick Mathewson před 5 roky
rodič
revize
53ccdb6945
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      src/core/mainloop/mainloop.c

+ 2 - 1
src/core/mainloop/mainloop.c

@@ -1515,7 +1515,8 @@ get_my_roles(const or_options_t *options)
                   options->ControlPort_set ||
                   options->OwningControllerFD != UINT64_MAX;
 
-  int is_net_participant = is_participating_on_network();
+  int is_net_participant = is_participating_on_network() ||
+    is_relay || is_hidden_service;
 
   if (is_bridge) roles |= PERIODIC_EVENT_ROLE_BRIDGE;
   if (is_client) roles |= PERIODIC_EVENT_ROLE_CLIENT;