mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 19:06:35 +03:00
Never ignore SQL errors when reading SOCKS5 settings
Otherwise we may accidentally connect directly due to temporary error.
This commit is contained in:
@@ -63,10 +63,7 @@ impl Socks5Config {
|
||||
pub async fn from_database(context: &Context) -> Result<Option<Self>> {
|
||||
let sql = &context.sql;
|
||||
|
||||
let enabled = sql
|
||||
.get_raw_config_bool("socks5_enabled")
|
||||
.await
|
||||
.unwrap_or(false);
|
||||
let enabled = sql.get_raw_config_bool("socks5_enabled").await?;
|
||||
if enabled {
|
||||
let host = sql.get_raw_config("socks5_host").await?.unwrap_or_default();
|
||||
let port: u16 = sql
|
||||
|
||||
Reference in New Issue
Block a user