Skip to content

Commit 71912c6

Browse files
committed
Bug fix
Signed-off-by: avilevy <avilevy@google.com>
1 parent bb6e806 commit 71912c6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

plugins/out_stackdriver/stackdriver.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2776,16 +2776,15 @@ static void cb_stackdriver_flush(struct flb_event_chunk *event_chunk,
27762776
u_conn = flb_upstream_conn_get(ctx->u);
27772777
if (!u_conn) {
27782778
#ifdef FLB_HAVE_METRICS
2779-
flb_upstream_conn_release(u_conn);
27802779
cmt_counter_inc(ctx->cmt_failed_requests,
27812780
ts, 1, (char *[]) {name});
27822781

27832782
/* OLD api */
27842783
flb_metrics_sum(FLB_STACKDRIVER_FAILED_REQUESTS, 1, ctx->ins->metrics);
27852784

27862785
update_http_metrics(ctx, event_chunk, ts, STACKDRIVER_NET_ERROR);
2787-
update_retry_metric(ctx, event_chunk, ts, STACKDRIVER_NET_ERROR, FLB_RETRY);
27882786
#endif
2787+
flb_upstream_conn_release(u_conn);
27892788
FLB_OUTPUT_RETURN(FLB_RETRY);
27902789
}
27912790

0 commit comments

Comments
 (0)