mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-26 00:24:55 +01:00
Pass network
This commit is contained in:
parent
6d5802c0a5
commit
7b5d8de93f
@ -176,7 +176,7 @@ fn maybe(matches: clap::ArgMatches, log: Arc<Logger>) -> Result<(), Error> {
|
|||||||
// TODO: Spawn api connections on their own (non-main) thread, use the main thread to
|
// TODO: Spawn api connections on their own (non-main) thread, use the main thread to
|
||||||
// handle signals (a cli if stdin is not closed?) and make it stop and clean up all threads
|
// handle signals (a cli if stdin is not closed?) and make it stop and clean up all threads
|
||||||
// when bffh should exit
|
// when bffh should exit
|
||||||
server::serve_api_connections(log.clone(), config, db)
|
server::serve_api_connections(log.clone(), config, db, network)
|
||||||
// Signal is dropped here, stopping all executor threads as well.
|
// Signal is dropped here, stopping all executor threads as well.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,9 @@ use std::sync::Arc;
|
|||||||
use crate::db::Databases;
|
use crate::db::Databases;
|
||||||
|
|
||||||
/// Handle all API connections and run the RPC tasks spawned from that on the local thread.
|
/// Handle all API connections and run the RPC tasks spawned from that on the local thread.
|
||||||
pub fn serve_api_connections(log: Arc<Logger>, config: Settings, db: Databases) -> Result<(), Error> {
|
pub fn serve_api_connections(log: Arc<Logger>, config: Settings, db: Databases, nw: Network)
|
||||||
|
-> Result<(), Error>
|
||||||
|
{
|
||||||
let signal = Box::pin(async {
|
let signal = Box::pin(async {
|
||||||
let (tx, mut rx) = UnixStream::pair()?;
|
let (tx, mut rx) = UnixStream::pair()?;
|
||||||
// Initialize signal handler.
|
// Initialize signal handler.
|
||||||
|
Loading…
Reference in New Issue
Block a user