Skip to content

Commit

Permalink
Allow cluster_connect to return false
Browse files Browse the repository at this point in the history
This commit addresses GitHub Issue mit-dci#131.  That issue describes how it's
impossible to trigger the error "Failed to start coordinator client" in
sentinel_2pc::controller::init
(src/uhs/twophase/sentinel_2pc/controller.cpp) because the call to
cluster_connect in rpc::tcp_client::init always returns true.  This
commit changes the call to allow cluster_connect to return either true
or false.

Signed-off-by: Michael L. Szulczewski <[email protected]>
  • Loading branch information
mszulcz-mitre committed Jun 19, 2022
1 parent aa10a7a commit a975944
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/rpc/tcp_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace cbdc::rpc {
/// starts the response handler thread.
/// \return true.
[[nodiscard]] auto init() -> bool {
if(!m_net.cluster_connect(m_server_endpoints, false)) {
if(!m_net.cluster_connect(m_server_endpoints, true)) {
return false;
}

Expand Down

0 comments on commit a975944

Please sign in to comment.