control msg tester, fix mqtt router startup

This commit is contained in:
Evan Feenstra
2022-09-07 17:05:31 -07:00
parent 3992dfe6fe
commit 21ed9f97ea
8 changed files with 108 additions and 28 deletions

View File

@@ -11,9 +11,12 @@ use crate::mqtt::start_broker;
use crate::unix_fd::SignerLoop;
use crate::util::read_broker_config;
use clap::{App, AppSettings, Arg};
use rocket::tokio::{
self,
sync::{mpsc, oneshot},
};
use std::env;
use std::sync::Arc;
use rocket::tokio::{self, sync::{mpsc, oneshot}};
use url::Url;
use vls_frontend::Frontend;
use vls_proxy::client::UnixClient;
@@ -101,11 +104,11 @@ async fn run_main(parent_fd: i32) -> rocket::Rocket<rocket::Build> {
frontend.start();
});
}
// listen to reqs from CLN
let conn = UnixConnection::new(parent_fd);
let client = UnixClient::new(conn);
// TODO pass status_rx into SignerLoop
let mut signer_loop = SignerLoop::new(client, tx.clone());
// spawn CLN listener on a std thread
std::thread::spawn(move || {
signer_loop.start(Some(&settings));
});