upstream: avoid dns timeout null event injection
@@ -842,10 +842,11 @@ int flb_upstream_conn_timeouts(struct mk_list *list)
}
if (drop == 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);
}
