FILE *fp;
detail_state_t state;
time_t timestamp;
+ time_t running;
fr_ipaddr_t client_ip;
int load_factor; /* 1..100 */
int signal;
goto alloc_packet;
/*
- * We still have an outstanding packet.
- * Don't read any more.
+ * Periodically check what's going on.
+ * If the request is taking too long,
+ * retry it.
*/
case STATE_RUNNING:
- return 0;
+ if (time(NULL) < (data->running + data->retry_interval)) {
+ return 0;
+ }
+
+ DEBUG("No response to detail request. Retrying");
+ data->state = STATE_NO_REPLY;
+ /* FALL-THROUGH */
/*
* If there's no reply, keep
}
data->state = STATE_RUNNING;
+ data->running = packet->timestamp;
return 1;
}