There's the issue that during config-file loading we prefer to do all
changes in rule DB inside a single transaction, so the normal commands
do not close them. However with control socket commands we can't afford
to leave transactions open (unclear for how long), especially RW transactions.
if (stream_fd != STDIN_FILENO) {
fclose(out);
}
+ /* If a LMDB transaction got open, we can't leave it hanging.
+ * We accept the changes, if any. */
+ kr_cache_commit(&the_resolver->cache);
+ kr_rules_commit(true);
}
void io_tty_alloc(uv_handle_t *handle, size_t suggested, uv_buf_t *buf)