Skip to content

Commit 0f30534

Browse files
committed
Don't panic if monitors namespace is NotFound
1 parent 319f4ae commit 0f30534

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/lib.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,12 @@ impl Builder {
473473
) {
474474
Ok(monitors) => monitors,
475475
Err(e) => {
476-
log_error!(logger, "Failed to read channel monitors: {}", e.to_string());
477-
panic!("Failed to read channel monitors: {}", e.to_string());
476+
if e.kind() == std::io::ErrorKind::NotFound {
477+
Vec::new()
478+
} else {
479+
log_error!(logger, "Failed to read channel monitors: {}", e.to_string());
480+
panic!("Failed to read channel monitors: {}", e.to_string());
481+
}
478482
}
479483
};
480484

0 commit comments

Comments
 (0)