fix: panic on launch

Now we start the admin and sending threads at a later time.
This commit is contained in:
Timo Kösters 2022-10-08 13:57:01 +02:00 committed by Nyaaori
parent 50b0eb9929
commit 8b5b7a1f63
No known key found for this signature in database
GPG key ID: E7819C3ED4D1F82E
20 changed files with 46 additions and 53 deletions

View file

@ -29,7 +29,7 @@ use ruma::{
},
ServerName, UInt,
};
use tracing::{info, warn};
use tracing::{error, info, warn};
/// # `POST /_matrix/client/r0/publicRooms`
///
@ -279,15 +279,14 @@ pub(crate) async fn get_public_rooms_filtered_helper(
JoinRule::Knock => Some(PublicRoomJoinRule::Knock),
_ => None,
})
.map_err(|_| {
Error::bad_database("Invalid room join rule event in database.")
.map_err(|e| {
error!("Invalid room join rule event in database: {}", e);
Error::BadDatabase("Invalid room join rule event in database.")
})
})
.transpose()?
.flatten()
.ok_or(Error::bad_database(
"Invalid room join rule event in database.",
))?,
.ok_or_else(|| Error::bad_database("Missing room join rule event for room."))?,
room_id,
};
Ok(chunk)