Skip to content

Commit

Permalink
Increase gRPC client deadline to 3 seconds and copy additional proto …
Browse files Browse the repository at this point in the history
…files to binary directory
  • Loading branch information
naderzare committed Dec 16, 2024
1 parent f30c89f commit bc223b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,8 @@ file(COPY
formations-dt formations-keeper formations-taker player.conf coach.conf start-debug.sh start-offline.sh start-debug-agent.sh
DESTINATION ${PROJECT_BINARY_DIR}/bin
)

file(COPY
${PROJECT_SOURCE_DIR}/idl/grpc/service.proto ${PROJECT_SOURCE_DIR}/idl/thrift/soccer_service.thrift
DESTINATION ${PROJECT_BINARY_DIR}/bin
)
2 changes: 1 addition & 1 deletion src/grpc-client/grpc_client_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ void GrpcClientPlayer::getActions()
protos::PlayerActions actions;
ClientContext context;
// Set the deadline to 1 second from now
auto deadline = std::chrono::system_clock::now() + std::chrono::seconds(1);
auto deadline = std::chrono::system_clock::now() + std::chrono::seconds(3);
context.set_deadline(deadline);

Status status = M_stub_->GetPlayerActions(&context, state, &actions);
Expand Down

0 comments on commit bc223b9

Please sign in to comment.