Skip to content

Commit

Permalink
output: validate if instance enabled TLS or not (#1840)
Browse files Browse the repository at this point in the history
Signed-off-by: Pradeep Hiremande <16595434+phiremande@users.noreply.github.com>
  • Loading branch information
phiremande authored and edsiper committed Jan 13, 2020
1 parent 1dddbef commit ed6d447
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/flb_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ int flb_output_instance_destroy(struct flb_output_instance *ins)
#endif

#ifdef FLB_HAVE_TLS
if (ins->flags & FLB_IO_TLS) {
if (ins->use_tls == FLB_TRUE) {
if (ins->tls.context) {
flb_tls_context_destroy(ins->tls.context);
}
Expand Down Expand Up @@ -571,7 +571,7 @@ int flb_output_init(struct flb_config *config)
#endif

#ifdef FLB_HAVE_TLS
if (ins->flags & FLB_IO_TLS) {
if (ins->use_tls == FLB_TRUE) {
ins->tls.context = flb_tls_context_new(ins->tls_verify,
ins->tls_debug,
ins->tls_vhost,
Expand Down

0 comments on commit ed6d447

Please sign in to comment.