Skip to content

Commit ca28e17

Browse files
committed
Don't panic if monitors namespace is NotFound
1 parent ab6c009 commit ca28e17

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
@@ -511,8 +511,12 @@ impl Builder {
511511
) {
512512
Ok(monitors) => monitors,
513513
Err(e) => {
514-
log_error!(logger, "Failed to read channel monitors: {}", e.to_string());
515-
panic!("Failed to read channel monitors: {}", e.to_string());
514+
if e.kind() == std::io::ErrorKind::NotFound {
515+
Vec::new()
516+
} else {
517+
log_error!(logger, "Failed to read channel monitors: {}", e.to_string());
518+
panic!("Failed to read channel monitors: {}", e.to_string());
519+
}
516520
}
517521
};
518522

0 commit comments

Comments
 (0)