Skip to content

Commit 9c8a392

Browse files
committed
Don't panic if monitors namespace is NotFound
1 parent 427e74c commit 9c8a392

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/lib.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,8 +523,12 @@ impl Builder {
523523
) {
524524
Ok(monitors) => monitors,
525525
Err(e) => {
526-
log_error!(logger, "Failed to read channel monitors: {}", e.to_string());
527-
panic!("Failed to read channel monitors: {}", e.to_string());
526+
if e.kind() == std::io::ErrorKind::NotFound {
527+
Vec::new()
528+
} else {
529+
log_error!(logger, "Failed to read channel monitors: {}", e.to_string());
530+
panic!("Failed to read channel monitors: {}", e.to_string());
531+
}
528532
}
529533
};
530534

0 commit comments

Comments
 (0)