瀏覽代碼

Sending response to SIGNAL HEARTBEAT controller command.

rl1987 10 年之前
父節點
當前提交
bf67a60b86
共有 2 個文件被更改,包括 4 次插入0 次删除
  1. 3 0
      src/or/control.c
  2. 1 0
      src/or/main.c

+ 3 - 0
src/or/control.c

@@ -4455,6 +4455,9 @@ control_event_signal(uintptr_t signal)
     case SIGCLEARDNSCACHE:
       signal_string = "CLEARDNSCACHE";
       break;
+    case SIGHEARTBEAT:
+      signal_string = "HEARTBEAT";
+      break;
     default:
       log_warn(LD_BUG, "Unrecognized signal %lu in control_event_signal",
                (unsigned long)signal);

+ 1 - 0
src/or/main.c

@@ -2139,6 +2139,7 @@ process_signal(uintptr_t sig)
       break;
     case SIGHEARTBEAT:
       log_heartbeat(time(NULL));
+      control_event_signal(sig);
       break;
   }
 }