try connect without async

This commit is contained in:
Evan Feenstra
2022-06-10 10:34:18 -07:00
parent 7ee7ac071c
commit 8946a4cd8f
2 changed files with 25 additions and 11 deletions

View File

@@ -60,16 +60,16 @@ fn main() -> anyhow::Result<()> {
} else {
let (tx, rx) = mpsc::channel(1000);
let (status_tx, _status_rx) = mpsc::channel(1000);
let runtime = start_broker(rx, status_tx, "sphinx-1");
runtime.block_on(async {
init::connect(tx.clone()).await;
// 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);
signer_loop.start();
})
let _runtime = start_broker(rx, status_tx, "sphinx-1");
// runtime.block_on(async {
init::blocking_connect(tx.clone());
// 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);
signer_loop.start();
// })
}
Ok(())