fix(rp): Start the proper rosenpass server on a dedicated thread

We should not block the tokio executor indefinetly.
This commit is contained in:
Karolin Varner
2025-08-02 19:13:21 +02:00
parent 2d6550da0f
commit a1698f36a6
4 changed files with 9 additions and 8 deletions

View File

@@ -22,8 +22,9 @@ use rosenpass_util::functional::{ApplyExt, MutatingExt};
use rosenpass_util::result::OkExt;
use rosenpass_util::tokio::janitor::{spawn_cleanup_job, try_spawn_daemon};
use rosenpass_wireguard_broker::brokers::native_unix::{
NativeUnixBroker, NativeUnixBrokerConfigBaseBuilder, NativeUnixBrokerConfigBaseBuilderError,
NativeUnixBroker, NativeUnixBrokerConfigBaseBuilder,
};
use tokio::task::spawn_blocking;
use crate::key::WG_B64_LEN;
@@ -528,5 +529,5 @@ pub async fn exchange(options: ExchangeOptions) -> Result<()> {
}
log::info!("Starting to perform rosenpass key exchanges!");
srv.event_loop()
spawn_blocking(move || srv.event_loop()).await?
}