Skip to content

Commit 8b9e0f4

Browse files
authored
Apply suggestions from code review
Co-authored-by: Felix Exner <feex@universal-robots.com>
1 parent e84c769 commit 8b9e0f4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/ur/dashboard_client_implementation_x.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ DashboardClientImplX::DashboardClientImplX(const std::string& host) : DashboardC
6161
// each one to plumb its own timeout. commandPowerOn already accepts its own (longer)
6262
// timeout parameter. Callers needing different limits can override via setReceiveTimeout.
6363
cli_->set_connection_timeout(std::chrono::seconds(5));
64-
cli_->set_read_timeout(std::chrono::seconds(10));
65-
cli_->set_write_timeout(std::chrono::seconds(10));
64+
cli_->set_read_timeout(std::chrono::seconds(recv_timeout_.tv_sec) + std::chrono::microseconds(recv_timeout_.tv_usec));
65+
cli_->set_write_timeout(std::chrono::seconds(send_timeout_.tv_sec) + std::chrono::microseconds(send_timeout_.tv_usec));
6666
}
6767

6868
void DashboardClientImplX::setReceiveTimeout(const timeval& timeout)
@@ -93,7 +93,7 @@ bool DashboardClientImplX::connect([[maybe_unused]] const size_t max_num_tries,
9393
{
9494
std::string endpoint = base_url_ + "/openapi.json";
9595
// The PolyScope X Robot API doesn't require any connection prior to making calls. However, this
96-
// check call will assurea that the endpoint for making Robot API calls exist. This could fail if
96+
// check call will assure that the endpoint for making Robot API calls exist. This could fail if
9797
// the IP address is wrong or the robot at the IP doesn't have the necessary software version.
9898
if (auto res = cli_->Get(endpoint))
9999
{

0 commit comments

Comments
 (0)