Skip to content

Commit

Permalink
Do not use timeout.
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Agüero <[email protected]>
  • Loading branch information
caguero committed Mar 12, 2024
1 parent 0ed5942 commit 687edcc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/cmd/gz.cc
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ extern "C" void cmdServiceReq(const char *_service,
Node node;
bool result;

if (_timeout == -1 || !strcmp(_repType, "gz.msgs.Empty"))
if (!strcmp(_repType, "gz.msgs.Empty"))
{
// One-way service.
node.Request(_service, *req, 1000, *rep, result);
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/gz.hh
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ extern "C" void cmdTopicPub(const char *_topic,
/// \param[in] _service Service name.
/// \param[in] _reqType Message type used in the request.
/// \param[in] _repType Message type used in the response.
/// If "gz.msgs.Empty" is used, the request will be one-way
/// and _repType and _timeout will be ignored.
/// \param[in] _timeout The request will timeout after '_timeout' ms.
/// If -1 is used, the request will be one-way and _repType
/// will be ignored.
/// \param[in] _reqData Input data sent in the request.
/// The format expected is the same used by Protobuf DebugString().
/// E.g.: cmdServiceReq("/bar", "gz.msgs.StringMsg",
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/service_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void runServiceCommand(const ServiceOptions &_opt)
// One-way service request.
cmdServiceReq(_opt.service.c_str(),
_opt.reqType.c_str(), "gz.msgs.Empty",
-1, _opt.reqData.c_str());
0, _opt.reqData.c_str());
}
else
{
Expand Down

0 comments on commit 687edcc

Please sign in to comment.