Skip to content

Commit

Permalink
Fix success message bootstrap on server side
Browse files Browse the repository at this point in the history
  • Loading branch information
AurelienFT committed Jun 27, 2022
1 parent aabc030 commit e2d674f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion massa-bootstrap/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ async fn stream_final_state(
});
}
BootstrapServerMessage::FinalStateFinished => {
info!("State bootstrap complete");
*next_bootstrap_message = Some(BootstrapClientMessage::AskBootstrapPeers);
return Ok(());
}
Expand Down Expand Up @@ -296,7 +297,7 @@ async fn bootstrap_from_server(
}
};
}
info!("Successful state bootstrap");
info!("Successful bootstrap");
Ok(())
}

Expand Down
7 changes: 6 additions & 1 deletion massa-bootstrap/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,12 @@ async fn manage_bootstrap(
loop {
match tokio::time::timeout(bootstrap_settings.read_timeout.into(), server.next()).await {
Err(_) => return Ok(()),
Ok(Err(e)) => return Err(e),
Ok(Err(e)) => {
match e {
BootstrapError::IoError(_) => return Ok(()),
_ => return Err(e)
}
},
Ok(Ok(msg)) => match msg {
BootstrapClientMessage::AskBootstrapPeers => {
match tokio::time::timeout(
Expand Down

0 comments on commit e2d674f

Please sign in to comment.