You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by if...@apache.org on 2021/03/28 06:06:11 UTC
[rocketmq-client-nodejs] 01/01: fix: compile on linux and ci
This is an automated email from the ASF dual-hosted git repository.
ifplusor pushed a commit to branch n-api
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-nodejs.git
commit cde8c25e13601c30f0ca6a39836b159cf5d590d2
Author: James Yin <yw...@hotmail.com>
AuthorDate: Sun Mar 28 13:29:48 2021 +0800
fix: compile on linux and ci
---
deps/rocketmq | 2 +-
package.json | 2 +-
src/producer.cpp | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/deps/rocketmq b/deps/rocketmq
index fcecc8d..1584a34 160000
--- a/deps/rocketmq
+++ b/deps/rocketmq
@@ -1 +1 @@
-Subproject commit fcecc8dba97972d4c934b00cadc97a07406b563d
+Subproject commit 1584a34ec7a44137085dbc5eb2b3047726b433fc
diff --git a/package.json b/package.json
index 5e38e40..f2ed65e 100644
--- a/package.json
+++ b/package.json
@@ -8,7 +8,7 @@
"main": "index.js",
"scripts": {
"preinstall": "git submodule update --init --recommend-shallow",
- "install": "deps/rocketmq/build.sh && node-gyp rebuild",
+ "install": "if [ ! -d deps/rocketmq/bin ]; then deps/rocketmq/build.sh; fi && node-gyp rebuild",
"test": "npm run lint && echo 'temp example test' && node example/producer.js && node example/push_consumer.js",
"lint": "eslint ."
},
diff --git a/src/producer.cpp b/src/producer.cpp
index 45dfe1f..f47b5f5 100644
--- a/src/producer.cpp
+++ b/src/producer.cpp
@@ -193,8 +193,8 @@ class ProducerSendCallback : public rocketmq::AutoDeleteSendCallback {
public:
ProducerSendCallback(Napi::Env&& env, Napi::Function&& callback)
- : callback_(
- Callback::New(env, callback, "RocketMQ Send Callback", 0, 1)) {}
+ : callback_(Callback::New(
+ env, callback, "RocketMQ Send Callback", 0, 1, nullptr)) {}
~ProducerSendCallback() { callback_.Release(); }