∅:D[
3.649] → [
4.2180:2498]
∅:D[
2.728] → [
4.2180:2498]
∅:D[
4.2180] → [
4.2180:2498]
∅:D[
4.2498] → [
2.729:805]
∅:D[
2.805] → [
4.2574:2615]
∅:D[
5.350] → [
4.2574:2615]
∅:D[
4.2574] → [
4.2574:2615]
∅:D[
4.2615] → [
2.806:861]
∅:D[
2.861] → [
4.2676:3237]
∅:D[
4.2676] → [
4.2676:3237]
Box::new(future::loop_fn(
(sink, stream, account),
|(sink, stream, account)| {
stream.into_future().then(|r| match r {
Ok((event, stream)) => match event {
Some(Event::Online) => {
info!("Online");
future::ok(future::Loop::Break(XmppConnection {
account,
inner: (sink, stream),
}))
}
Some(Event::Stanza(s)) => {
info!("xmpp stanza: {:?}", s);
future::ok(future::Loop::Continue((sink, stream, account)))
}
_ => {
warn!("Disconnected");
future::err(account)
}
},
Err((e, _)) => {
error!("xmpp receive error: {}", e);
Box::new(future::loop_fn((client, account), |(client, account)| {
client.into_future().then(|r| match r {
Ok((event, client)) => match event {
Some(Event::Online) => {
info!("Online");
future::ok(future::Loop::Break(XmppConnection {
account,
inner: client,
}))
}
Some(Event::Stanza(s)) => {
info!("xmpp stanza: {:?}", s);
future::ok(future::Loop::Continue((client, account)))
}
_ => {
warn!("Disconnected");