- Some(conn_closed_fut) => {
- let mut closed_fut_box = Box::pin(conn_closed_fut);
- let mut peer_connected = false;
- while !peer_connected {
- match futures::poll!(&mut closed_fut_box) {
+ Some(connection_closed_future) => {
+ let mut connection_closed_future = Box::pin(connection_closed_future);
+ loop {
+ match futures::poll!(&mut connection_closed_future) {