Skip to content

Commit

Permalink
upstream: put timed out busy connection on destroy queue
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
edsiper committed Mar 23, 2021
1 parent 961ed61 commit 1938ec8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 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,7 @@ int flb_upstream_conn_timeouts(struct mk_list *list)
*/
shutdown(u_conn->fd, SHUT_RDWR);
u_conn->net_error = ETIMEDOUT;
prepare_destroy_conn(u_conn);
}
}

Expand Down

0 comments on commit 1938ec8

Please sign in to comment.