async fn run_hb(cf: ConFile, ctx: &Context) -> Result<()> {
let mut hb =
async_zmq::reply(format!("{}://{}:{}", cf.transport, cf.ip, cf.hb_port).as_str())?
.with_context(&ctx)
.bind()?;
while let Some(msg) = hb.next().await {
let msg = msg.unwrap();
hb.send(msg).await;
}
Ok(())
}
```I have this lovely async function which just handles a heartbeat. Get a message on the zmq socket, and respond that I am still alive and well. I however have things to communicate on other zmq sockets, so I would love to just stick this as a background task using tokio::spawn. Unfortunately, that produces this error
main.rs(15, 29): future is not Send as this value is used across an await
main.rs(15, 35): hb is later dropped here
main.rs(15, 17): consider moving this into a let binding to create a shorter lived borrow
spawn.rs(163, 21): required by a bound in tokio::spawn
```I can tell that it's something with multiple borrows, but I am lost on how to fix it. If I just do hb.send(msg); (that is, without the await), it compiles, but obviously doesn't do anything useful.