fr_time_t last_connected; //!< Last time a connection connected.
- fr_time_t last_open_failed; //!< Last time a connection failed.
+ fr_time_t last_failed; //!< Last time a connection failed.
/** @} */
/** @name Statistics
* we refuse to enqueue new requests until
* one or more connections comes online.
*/
- if (trunk->last_open_failed && (trunk->last_open_failed >= trunk->last_connected)) {
+ if (trunk->last_failed && (trunk->last_failed >= trunk->last_connected)) {
ROPTIONAL(RWARN, WARN, "Refusing to enqueue requests - "
"No active connections and last event was a connection failure");
fr_trunk_connection_t *tconn = talloc_get_type_abort(uctx, fr_trunk_connection_t);
fr_trunk_t *trunk = tconn->pub.trunk;
+ trunk->last_failed = fr_time();
+
/*
* Other conditions will be handled by on_closed
*/
fr_dlist_insert_head(&trunk->failed, tconn);
CONN_STATE_TRANSITION(FR_TRUNK_CONN_FAILED);
-
- trunk->last_open_failed = fr_time();
}
/** Connection transitioned to the halted state