diff options
author | Determinant <[email protected]> | 2019-06-24 17:31:17 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2019-06-24 17:31:17 -0400 |
commit | 9c1ff90092532a62141ae0e9d54461300b1d47cb (patch) | |
tree | 8126fdc895710be3b3a5622ed7c492a6616d6e2a /src | |
parent | 811619ba36d0151d451647fe55e7a16d44b56357 (diff) |
update to work with the latest net lib
Diffstat (limited to 'src')
-rw-r--r-- | src/hotstuff_app.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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(); }); |