Lots of changes. In no particular order:
[distributedratelimiting.git] / drl / drl_state.c
index a30337b..ea68f51 100644 (file)
@@ -134,6 +134,7 @@ int read_comm(comm_t *comm, double *aggregate, double decayto) {
              * we start to make the peer's value approach decayto, getting
              * half of the way there each time. */
             if (remote->awol >= REMOTE_AWOL_THRESHOLD) {
+                printlog(LOG_WARN, "AWOL remote limiter detected.\n");
                 remote->rate += ((decayto - remote->rate) / 2);
             } else {
                 remote->awol++;
@@ -213,6 +214,8 @@ void *limiter_receive_thread(void *unused) {
 
     sigemptyset(&signal_mask);
     sigaddset(&signal_mask, SIGHUP);
+    sigaddset(&signal_mask, SIGUSR1);
+    sigaddset(&signal_mask, SIGUSR2);
     pthread_sigmask(SIG_BLOCK, &signal_mask, NULL);
 
     pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL);