mirror of
https://github.com/stakwork/sphinx-key.git
synced 2025-12-17 23:34:19 +01:00
wait one second for mqtt router to start before sending init
This commit is contained in:
@@ -14,7 +14,7 @@ pub fn blocking_connect(tx: mpsc::Sender<ChannelRequest>) {
|
||||
message: init_msg_2,
|
||||
reply_tx,
|
||||
};
|
||||
let _ = tx.blocking_send(request);
|
||||
tx.blocking_send(request).expect("could not blocking send");
|
||||
let res = reply_rx.blocking_recv().expect("couldnt receive");
|
||||
let reply = parser::response_from_bytes(res.reply, 0).expect("could parse init receive");
|
||||
println!("REPLY {:?}", reply);
|
||||
|
||||
@@ -94,6 +94,9 @@ pub fn start_broker(
|
||||
});
|
||||
});
|
||||
|
||||
// give one second for router to spawn listeners
|
||||
std::thread::sleep(std::time::Duration::from_secs(1));
|
||||
|
||||
rt
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user