tls: re-added a piece of code I removed by mistake
@@ -606,8 +606,15 @@ int flb_tls_session_create(struct flb_tls *tls,
connection->coroutine = NULL;
+ /* This check's purpose is to abort when a timeout is detected.
+ */
+ if (connection->net_error == -1) {
goto retry_handshake;
}
+ else {
+ result = -1;
+ }
+ }
cleanup:
if (event_restore_needed) {
