Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

Commit

Permalink
Merge branch 'develop' into test-kcov
Browse files Browse the repository at this point in the history
  • Loading branch information
neonphog authored Feb 13, 2020
2 parents 3664d2f + 2a7d326 commit 765633d
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions crates/core/src/network/handler/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,18 @@ pub fn handle_send_message(message_data: DirectMessageData, context: Arc<Context
context.spawn_task(future);
}
DirectMessage::RequestValidationPackage(address) => {
// TODO: run this function with an async block spawned to the pool too, like above.
// This currently doesn't work, I believe because this function is not async so
// we wouldn't have any await in this async block.
// Though I did expect that to work. Maybe this is a pull for actually jumping to
// rust 1.39 where async/await is part of stable (currently we are using unstable
// feature for this).
respond_validation_package_request(
message_data.from_agent_id.into(),
message_data.request_id,
address,
context,
vec![],
);
context.spawn_task({
let context = context.clone();
async move || {
respond_validation_package_request(
message_data.from_agent_id.into(),
message_data.request_id,
address,
context,
vec![],
);
}
}());
}
DirectMessage::ValidationPackage(_) => {
log_error!(context,
Expand Down

0 comments on commit 765633d

Please sign in to comment.