out_nats: always do connect handshake
@@ -172,7 +172,6 @@ void cb_nats_flush(void *data, size_t bytes,
}
/* Before to flush the content check if we need to start the handshake */
- if (u_conn->fd <= 0) {
ret = flb_io_net_write(u_conn,
NATS_CONNECT,
sizeof(NATS_CONNECT) - 1,
@@ -181,7 +180,6 @@ void cb_nats_flush(void *data, size_t bytes,
flb_upstream_conn_release(u_conn);
FLB_OUTPUT_RETURN(FLB_RETRY);
}
- }
/* Convert original Fluent Bit MsgPack format to JSON */
ret = msgpack_to_json(data, bytes, tag, tag_len, &json_msg, &json_len);
