Skip to content

Commit

Permalink
out_forward: if secure forward handshake fails do a proper exit
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
edsiper committed Apr 12, 2017
1 parent e093834 commit d613b2e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugins/out_forward/forward.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,11 @@ void cb_forward_flush(void *data, size_t bytes,
if (ctx->secured == FLB_TRUE) {
ret = secure_forward_handshake(u_conn, ctx);
flb_debug("[out_fw] handshake status = %i", ret);
if (ret == -1) {
flb_upstream_conn_release(u_conn);
msgpack_sbuffer_destroy(&mp_sbuf);
FLB_OUTPUT_RETURN(FLB_RETRY);
}
}
#endif

Expand Down

0 comments on commit d613b2e

Please sign in to comment.