From 03aef18a3799d544cea7b78edfc623fbdcf278ac Mon Sep 17 00:00:00 2001 From: Phillip Adair Stewart Whelan Date: Mon, 16 Sep 2024 11:29:16 -0300 Subject: [PATCH] io: use connection flags when setting async in flb_io_net_connect. Signed-off-by: Phillip Adair Stewart Whelan --- src/flb_io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/flb_io.c b/src/flb_io.c index bb30ebea8a6..6e28f42a575 100644 --- a/src/flb_io.c +++ b/src/flb_io.c @@ -109,6 +109,7 @@ int flb_io_net_connect(struct flb_connection *connection, int ret; int async = FLB_FALSE; flb_sockfd_t fd = -1; + int flags = flb_connection_get_flags(connection); // struct flb_upstream *u = u_conn->u; if (connection->fd > 0) { @@ -119,7 +120,7 @@ int flb_io_net_connect(struct flb_connection *connection, } /* Check which connection mode must be done */ - if (coro) { + if (coro && (flags & FLB_IO_ASYNC)) { async = flb_upstream_is_async(connection->upstream); } else {