Skip to content

Commit

Permalink
Only reset error if a previous error was set.
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianNichols committed Feb 20, 2024
1 parent c9ac449 commit 287dc63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/aerospike/aerospike.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,11 @@ aerospike_close(aerospike* as, as_error* err)
if (cluster) {
if (cluster->metrics_enabled) {
as_status status = aerospike_disable_metrics(as, err);

if (status != AEROSPIKE_OK) {
as_log_warn("Metrics error: %s %s", as_error_string(status), err->message);
as_error_reset(err);
}
as_error_reset(err);
}

if (as_event_loop_size > 0 && !as_event_single_thread) {
Expand Down

0 comments on commit 287dc63

Please sign in to comment.