Skip to content

Commit

Permalink
Add retries to auth message
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaSBrown committed Jan 24, 2025
1 parent b389af3 commit dd87a7b
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions repository/gridftp/globus5/authz/source/AuthzWorker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -591,11 +591,18 @@ int AuthzWorker::checkAuth(char *client_id, char *path, char *action) {

m_log_context.correlation_id =
std::get<std::string>(message->get(MessageAttribute::CORRELATION_ID));
DL_INFO(m_log_context,
"Sending RepoAuthzRequest client_id: " << client_id << " path: " << path << " action: " << action );
m_comm->send(*message);

auto response = m_comm->receive(MessageType::GOOGLE_PROTOCOL_BUFFER);
ICommunicator::Response response;

int attempt = 0;
int retries = 3;
do {
DL_INFO(m_log_context,
"Sending RepoAuthzRequest client_id: " << client_id << " path: " << path << " action: " << action << " attempt: " << attempt);
m_comm->send(*message);
response = m_comm->receive(MessageType::GOOGLE_PROTOCOL_BUFFER);
++attempt;
} while (response.time_out && attempt < retries);

return processResponse(response);
}
Expand Down

0 comments on commit dd87a7b

Please sign in to comment.