From 6e7c139915583fa6d8a29d29f93c9f7f5cda3960 Mon Sep 17 00:00:00 2001 From: Baodi Shi Date: Mon, 4 Dec 2023 21:26:52 +0800 Subject: [PATCH] fix segmentation failed. --- src/Consumer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Consumer.cc b/src/Consumer.cc index 9aa48c72..3546f834 100644 --- a/src/Consumer.cc +++ b/src/Consumer.cc @@ -293,8 +293,8 @@ Napi::Value Consumer::BatchReceive(const Napi::CallbackInfo &info) { pulsar_message_t *rawMessage = pulsar_messages_get(rawMessages, i); pulsar_message_t *message = pulsar_message_create(); pulsar_message_copy(rawMessage, message); - Napi::Object obj = Message::NewInstance( - {}, std::shared_ptr(message, pulsar_message_free)); + Napi::Object obj = + Message::NewInstance({}, std::shared_ptr(message, pulsar_message_free)); jsArray.Set(i, obj); } pulsar_messages_free(rawMessages);