Skip to content

Commit fbfcde7

Browse files
pwhelanAndrewChubatiuk
authored andcommitted
tls: check async before using coroutines in flb_tls_session_create.
Signed-off-by: Phillip Adair Stewart Whelan <[email protected]>
1 parent 49b466a commit fbfcde7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tls/flb_tls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ int flb_tls_session_create(struct flb_tls *tls,
579579
* In the other case for an async socket 'th' is NOT NULL so the code
580580
* is under a coroutine context and it can yield.
581581
*/
582-
if (co == NULL) {
582+
if (co == NULL || !flb_upstream_is_async(connection->upstream)) {
583583
flb_trace("[io_tls] server handshake connection #%i in process to %s",
584584
connection->fd,
585585
flb_connection_get_remote_address(connection));

0 commit comments

Comments
 (0)