6DSWVNSYTGYN33VFBLXK655PFELW5ED2IFB2IZVHM4X277QRVUFAC
hyper::rt::run(http_server);
let mut rt = Runtime::new().expect("Cann't start tokio");
rt.spawn(http_server);
let xmpp_join = std::thread::spawn(|| -> Result<(), tokio::io::Error> {
// Launch single-threaded runtime
let mut ctrt = current_thread::Runtime::new()?;
ctrt.block_on(future::ok::<_, tokio::io::Error>(()))
});
println!("Server started");
rt.shutdown_on_idle().wait().expect("Shutdown error");
println!("Server stopper");
xmpp_join
.join()
.expect("Join xmpp thread")
.expect("Result xmpp thread");