check if rocksdb_max_log_files is 0

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-03-15 22:39:28 -04:00 committed by June
parent 623478fa2d
commit c6cf3589f4

View file

@ -220,6 +220,12 @@ async fn main() {
}
}
// rocksdb does not allow max_log_files to be 0
if config.rocksdb_max_log_files == 0 && cfg!(feature = "rocksdb") {
error!("When using RocksDB, rocksdb_max_log_files cannot be 0. Please set a value at least 1.");
return;
}
// yeah, unless the user built a debug build hopefully for local testing only
if config.server_name == "your.server.name" && !cfg!(debug_assertions) {
error!("You must specify a valid server name for production usage of conduwuit.");