+ /* Close connections to hosts that have a changed or deleted host config file */
+
+ for list_each(connection_t, c, connection_list) {
+ if(c->status.control)
+ continue;
+
+ xasprintf(&fname, "%s" SLASH "hosts" SLASH "%s", confbase, c->name);
+ struct stat s;
+ if(stat(fname, &s) || s.st_mtime > last_config_check) {
+ logger(DEBUG_CONNECTIONS, LOG_INFO, "Host config file of %s has been changed", c->name);
+ terminate_connection(c, c->status.active);
+ }
+ free(fname);
+ }
+
+ last_config_check = time(NULL);
+