Skip to content

Commit

Permalink
Moved code to the proper place and added test
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianReimold committed May 3, 2024
1 parent eaca193 commit a0f6f2d
Show file tree
Hide file tree
Showing 3 changed files with 154 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ namespace eCAL
*/
eCAL::service::Error call_service(const std::shared_ptr<const std::string>& request, std::shared_ptr<std::string>& response);

/**
/** TODO: Revise documentation
* @brief Get the address that this client session has been created with.
*
* This function returns the address that this client session has been
Expand All @@ -234,7 +234,7 @@ namespace eCAL
*/
std::string get_address() const;

/**
/**TODO: Revise documentation
* @brief Get the port that this client session has been created with.
*
* This function returns the port that this client session has been
Expand Down
9 changes: 5 additions & 4 deletions ecal/service/ecal_service/src/client_session_impl_v1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ namespace eCAL
ECAL_SERVICE_LOG_DEBUG_VERBOSE(me->logger_, endpoints_str);
}
#endif //ECAL_SERVICE_LOG_DEBUG_VERBOSE_ENABLED
{
std::lock_guard<std::mutex> chosen_endpoint_lock(me->chosen_endpoint_mutex_);
me->chosen_endpoint_ = me->server_list_[server_list_index];
}
me->connect_to_endpoint(resolved_endpoints, server_list_index);
}
}));
Expand Down Expand Up @@ -207,6 +203,11 @@ namespace eCAL
}
}

{
std::lock_guard<std::mutex> chosen_endpoint_lock(me->chosen_endpoint_mutex_);
me->chosen_endpoint_ = me->server_list_[server_list_index];
}

// Start sending the protocol handshake to the server. This will tell us the actual protocol version.
me->send_protocol_handshake_request();
}
Expand Down
Loading

0 comments on commit a0f6f2d

Please sign in to comment.