Skip to content

Commit

Permalink
tls: check async before using coroutines in flb_tls_session_create.
Browse files Browse the repository at this point in the history
Signed-off-by: Phillip Adair Stewart Whelan <phillip.whelan@chronosphere.io>
  • Loading branch information
pwhelan committed Sep 16, 2024
1 parent 6a198d2 commit 52d1eed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tls/flb_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ int flb_tls_session_create(struct flb_tls *tls,
* In the other case for an async socket 'th' is NOT NULL so the code
* is under a coroutine context and it can yield.
*/
if (co == NULL) {
if (co == NULL || !flb_upstream_is_async(connection->upstream)) {
flb_trace("[io_tls] server handshake connection #%i in process to %s",
connection->fd,
flb_connection_get_remote_address(connection));
Expand Down

0 comments on commit 52d1eed

Please sign in to comment.