Fix error type

This commit is contained in:
Bogdan-Ștefan Neacşu
2024-07-02 08:58:48 +00:00
parent b90136ac4e
commit c465eb3efc
2 changed files with 3 additions and 4 deletions
+2 -3
View File
@@ -194,9 +194,8 @@ pub enum GatewayError {
#[error("wireguard not set")]
WireguardNotSet,
#[cfg(all(feature = "wireguard", target_os = "linux"))]
#[error("failed to catch an interrupt: {source}")]
StdError {
#[error("failed to start authenticator: {source}")]
AuthenticatorStartError {
source: Box<dyn std::error::Error + Send + Sync>,
},
}
+1 -1
View File
@@ -563,7 +563,7 @@ impl<St> Gateway<St> {
Some(
self.start_authenticator(shutdown.fork("wireguard"))
.await
.map_err(|source| GatewayError::StdError { source })?,
.map_err(|source| GatewayError::AuthenticatorStartError { source })?,
)
} else {
None