Skip to content

Commit

Permalink
io: use connection flags when setting async in flb_io_net_connect.
Browse files Browse the repository at this point in the history
Signed-off-by: Phillip Adair Stewart Whelan <[email protected]>
  • Loading branch information
pwhelan authored and edsiper committed Sep 16, 2024
1 parent 93b8dea commit 03aef18
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/flb_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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 {
Expand Down

0 comments on commit 03aef18

Please sign in to comment.