@@ -91,6 +91,7 @@ static const conf_parser_t file_config[] = {
9191 { FR_CONF_OFFSET ("group" , rlm_linelog_t , file .group_str ) },
9292 { FR_CONF_OFFSET ("escape_filenames" , rlm_linelog_t , file .escape ), .dflt = "no" },
9393 { FR_CONF_OFFSET ("fsync" , rlm_linelog_t , file .fsync ), .dflt = "no" },
94+ { FR_CONF_OFFSET ("max_idle" , rlm_linelog_t , file .max_idle ), .dflt = "30s" },
9495 { FR_CONF_OFFSET ("buffer_count" , rlm_linelog_t , file .buffer_count ), .dflt = "1000" },
9596 { FR_CONF_OFFSET_IS_SET ("buffer_delay" , FR_TYPE_TIME_DELTA , 0 , rlm_linelog_t , file .buffer_delay ), .dflt = "1s" },
9697 { FR_CONF_OFFSET_IS_SET ("buffer_expiry" , FR_TYPE_TIME_DELTA , CONF_FLAG_HIDDEN , rlm_linelog_t , file .buffer_expiry ), .dflt = "30s" },
@@ -958,7 +959,7 @@ static int mod_instantiate(module_inst_ctx_t const *mctx)
958959 }
959960 if (!cf_pair_find (cs , "filename" )) goto no_filename ;
960961
961- inst -> file .ef = module_rlm_exfile_init (inst , conf , 256 , fr_time_delta_from_sec ( 30 ) , true,
962+ inst -> file .ef = module_rlm_exfile_init (inst , conf , 256 , inst -> file . max_idle , true,
962963 inst -> triggers , NULL , NULL );
963964 if (!inst -> file .ef ) {
964965 cf_log_err (conf , "Failed creating log file context" );
0 commit comments