mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
net/session/refine_session: replace unwrap with error handling
This commit is contained in:
@@ -36,7 +36,7 @@ use std::{
|
||||
};
|
||||
|
||||
use async_trait::async_trait;
|
||||
use tracing::{debug, warn};
|
||||
use tracing::{debug, error, warn};
|
||||
use url::Url;
|
||||
|
||||
use super::super::p2p::{P2p, P2pPtr};
|
||||
@@ -300,7 +300,9 @@ impl GreylistRefinery {
|
||||
);
|
||||
let last_seen = UNIX_EPOCH.elapsed().unwrap().as_secs();
|
||||
|
||||
hosts.whitelist_host(&url, last_seen).await.unwrap();
|
||||
if let Err(e) = hosts.whitelist_host(&url, last_seen).await {
|
||||
error!(target: "net::refinery", "Could not send {url} to the whitelist: {e}");
|
||||
}
|
||||
|
||||
debug!(target: "net::refinery", "GreylistRefinery complete!");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user