Skip to content

Commit

Permalink
Fix issue fluent#3192
Browse files Browse the repository at this point in the history
Signed-off-by: Fenggang <ginobiliwang@gmail.com>
  • Loading branch information
ginobiliwang committed Mar 10, 2021
1 parent 86f215a commit dcd99d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/flb_upstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ int flb_upstream_conn_timeouts(struct mk_list *list)
}

/* Iterate every busy connection */
mk_list_foreach(u_head, &uq->busy_queue) {
mk_list_foreach_safe(u_head, tmp, &uq->busy_queue) {
u_conn = mk_list_entry(u_head, struct flb_upstream_conn, _head);

drop = FLB_FALSE;
Expand All @@ -674,6 +674,10 @@ int flb_upstream_conn_timeouts(struct mk_list *list)
*/
shutdown(u_conn->fd, SHUT_RDWR);
u_conn->net_error = ETIMEDOUT;
/*
* Clean up connnection and events in libevent
*/
prepare_destroy_conn(u_conn);
}
}

Expand Down

0 comments on commit dcd99d2

Please sign in to comment.