From 9c1ff90092532a62141ae0e9d54461300b1d47cb Mon Sep 17 00:00:00 2001 From: Determinant Date: Mon, 24 Jun 2019 17:31:17 -0400 Subject: update to work with the latest net lib --- salticidae | 2 +- scripts/run_demo_client.sh | 2 +- src/hotstuff_app.cpp | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/salticidae b/salticidae index 9ec5a37..051fb69 160000 --- a/salticidae +++ b/salticidae @@ -1 +1 @@ -Subproject commit 9ec5a371f5c05fda8ddeac3470be6fc5c67d44e9 +Subproject commit 051fb69b7e1bd321e4c780e35f92ea93828b520f diff --git a/scripts/run_demo_client.sh b/scripts/run_demo_client.sh index 93a9148..5ed274d 100755 --- a/scripts/run_demo_client.sh +++ b/scripts/run_demo_client.sh @@ -1,2 +1,2 @@ #!/bin/bash -./hotstuff-client --idx 0 --iter -1 --max-async 3 +./hotstuff-client --idx 0 --iter -1 --max-async 4 diff --git a/src/hotstuff_app.cpp b/src/hotstuff_app.cpp index 31f63dd..25b5698 100644 --- a/src/hotstuff_app.cpp +++ b/src/hotstuff_app.cpp @@ -335,7 +335,11 @@ void HotStuffApp::client_request_cmd_handler(MsgReqCmd &&msg, const conn_t &conn it = unconfirmed.insert( std::make_pair(cmd_hash, promise_t([](promise_t &){}))).first; it->second.then([this, addr](const Finality &fin) { - cn.send_msg(MsgRespCmd(std::move(fin)), addr); + try { + cn.send_msg(MsgRespCmd(std::move(fin)), addr); + } catch (std::exception &err) { + HOTSTUFF_LOG_WARN("unable to send to the client: %s", err.what()); + } }); }); } @@ -364,6 +368,7 @@ void HotStuffApp::start(const std::vector> &reps client_conns.insert(conn); else client_conns.erase(conn); + return true; }); req_thread = std::thread([this]() { req_ec.dispatch(); }); resp_thread = std::thread([this]() { resp_ec.dispatch(); }); -- cgit v1.2.3