Skip to content

Commit 03aef18

Browse files
pwhelanedsiper
authored andcommitted
io: use connection flags when setting async in flb_io_net_connect.
Signed-off-by: Phillip Adair Stewart Whelan <[email protected]>
1 parent 93b8dea commit 03aef18

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/flb_io.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ int flb_io_net_connect(struct flb_connection *connection,
109109
int ret;
110110
int async = FLB_FALSE;
111111
flb_sockfd_t fd = -1;
112+
int flags = flb_connection_get_flags(connection);
112113
// struct flb_upstream *u = u_conn->u;
113114

114115
if (connection->fd > 0) {
@@ -119,7 +120,7 @@ int flb_io_net_connect(struct flb_connection *connection,
119120
}
120121

121122
/* Check which connection mode must be done */
122-
if (coro) {
123+
if (coro && (flags & FLB_IO_ASYNC)) {
123124
async = flb_upstream_is_async(connection->upstream);
124125
}
125126
else {

0 commit comments

Comments
 (0)