Skip to content

Commit

Permalink
upstream: avoid dns timeout null event injection (#4956)
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Fala <[email protected]>
  • Loading branch information
matthewfala authored Mar 5, 2022
1 parent 6ab7380 commit cc1280b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/flb_upstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,10 +842,11 @@ int flb_upstream_conn_timeouts(struct mk_list *list)
}

if (drop == FLB_TRUE) {
mk_event_inject(u_conn->evl, &u_conn->event,
MK_EVENT_READ | MK_EVENT_WRITE,
FLB_TRUE);

if (u_conn->event.status != MK_EVENT_NONE) {
mk_event_inject(u_conn->evl, &u_conn->event,
MK_EVENT_READ | MK_EVENT_WRITE,
FLB_TRUE);
}
u_conn->net_error = ETIMEDOUT;
prepare_destroy_conn(u_conn);
}
Expand Down

0 comments on commit cc1280b

Please sign in to comment.