Skip to content

Commit

Permalink
Merge pull request #8578 from michael-redpanda/issue-8072
Browse files Browse the repository at this point in the history
kafka/client: Better system_error handling
  • Loading branch information
dotnwat authored Feb 3, 2023
2 parents 2f4d81b + 8785fa8 commit 7a0ef9e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/v/kafka/client/broker.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ class broker : public ss::enable_lw_shared_from_this<broker> {
return ss::make_exception_future<Ret>(
broker_error(_node_id, error_code::broker_not_available));
})
.handle_exception_type([this](const std::system_error& e) {
if (net::is_reconnect_error(e)) {
return ss::make_exception_future<Ret>(
broker_error(_node_id, error_code::broker_not_available));
}
return ss::make_exception_future<Ret>(e);
})
.finally([b = shared_from_this()]() {});
}

Expand Down

0 comments on commit 7a0ef9e

Please sign in to comment.