0 errors left!

This commit is contained in:
Timo Kösters 2022-10-08 13:02:52 +02:00 committed by Nyaaori
parent f47a5cd5d5
commit d5b4754cf4
No known key found for this signature in database
GPG key ID: E7819C3ED4D1F82E
59 changed files with 656 additions and 563 deletions

View file

@ -35,7 +35,7 @@ type SyncHandle = (
);
pub struct Service {
pub db: Arc<dyn Data>,
pub db: &'static dyn Data,
pub actual_destination_cache: Arc<RwLock<WellKnownMap>>, // actual_destination, host
pub tls_name_override: Arc<RwLock<TlsNameMap>>,
@ -90,14 +90,14 @@ impl Default for RotationHandler {
}
impl Service {
pub fn load(db: Arc<dyn Data>, config: Config) -> Result<Self> {
pub fn load(db: &'static dyn Data, config: Config) -> Result<Self> {
let keypair = db.load_keypair();
let keypair = match keypair {
Ok(k) => k,
Err(e) => {
error!("Keypair invalid. Deleting...");
db.remove_keypair();
db.remove_keypair()?;
return Err(e);
}
};