aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------salticidae0
-rwxr-xr-xscripts/run_demo_client.sh2
-rw-r--r--src/hotstuff_app.cpp7
3 files changed, 7 insertions, 2 deletions
diff --git a/salticidae b/salticidae
-Subproject 9ec5a371f5c05fda8ddeac3470be6fc5c67d44e
+Subproject 051fb69b7e1bd321e4c780e35f92ea93828b520
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<std::pair<NetAddr, bytearray_t>> &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(); });