Skip to content

Commit

Permalink
Merge pull request #90 from szmyd/sync_up_main
Browse files Browse the repository at this point in the history
Sync up main
  • Loading branch information
raakella1 authored Jul 18, 2024
2 parents 53fbfbd + a5cf090 commit a53fe03
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
1 change: 0 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ AlignEscapedNewlines: Right
AlignOperands: false
AlignTrailingComments: true
AllowShortIfStatementsOnASingleLine: true
AllowShortBlocksOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: false
# AllowShortFunctionsOnASingleLine: InlineOnly
# AllowShortLoopsOnASingleLine: false
Expand Down
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class NuRaftMesgConan(ConanFile):
name = "nuraft_mesg"
version = "3.5.1"
version = "3.5.3"

homepage = "https://github.com/eBay/nuraft_mesg"
description = "A gRPC service for NuRAFT"
Expand Down
18 changes: 15 additions & 3 deletions src/lib/manager_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,22 @@ void ManagerImpl::restart_server() {

std::lock_guard< std::mutex > lg(_manager_lock);
RELEASE_ASSERT(_mesg_service, "Need to call ::start() first!");
sisl::GrpcServer* tmp_server = nullptr;
try {
tmp_server = sisl::GrpcServer::make(listen_address, start_params_.token_verifier_,
NURAFT_MESG_CONFIG(grpc_server_thread_cnt), start_params_.ssl_key_,
start_params_.ssl_cert_, start_params_.max_message_size_);
} catch (std::runtime_error const& e) {
LOGERROR("Failed to create GRPC server for Messaging Service: {}", e.what());
return;
}
if (!tmp_server) {
LOGERROR("Failed to create GRPC server: for Messaging Service");
return;
}

_grpc_server.reset();
_grpc_server = std::unique_ptr< sisl::GrpcServer >(sisl::GrpcServer::make(
listen_address, start_params_.token_verifier_, NURAFT_MESG_CONFIG(grpc_server_thread_cnt),
start_params_.ssl_key_, start_params_.ssl_cert_, start_params_.max_message_size_));
_grpc_server = std::unique_ptr< sisl::GrpcServer >(tmp_server);
_mesg_service->associate(_grpc_server.get());

_grpc_server->run();
Expand Down

0 comments on commit a53fe03

Please sign in to comment.