mirror of
https://github.com/romanz/electrs.git
synced 2025-02-24 23:08:39 +01:00
Improve error message when monitoring fails
This commit is contained in:
parent
11da7d884b
commit
144bc7ba6a
1 changed files with 4 additions and 1 deletions
|
@ -48,7 +48,10 @@ impl Metrics {
|
|||
}
|
||||
|
||||
pub fn start(&self) {
|
||||
let server = tiny_http::Server::http(self.addr).unwrap();
|
||||
let server = tiny_http::Server::http(self.addr).expect(&format!(
|
||||
"failed to start monitoring HTTP server at {}",
|
||||
self.addr
|
||||
));
|
||||
let reg = self.reg.clone();
|
||||
spawn_thread("metrics", move || loop {
|
||||
if let Err(e) = handle_request(®, server.recv()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue