You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/06/21 12:16:26 UTC

[GitHub] [pulsar-client-node] BewareMyPower commented on a diff in pull request #219: Add null check for consumer in MessageListenerProxy

BewareMyPower commented on code in PR #219:
URL: https://github.com/apache/pulsar-client-node/pull/219#discussion_r902544976


##########
src/Consumer.cc:
##########
@@ -63,7 +63,9 @@ void MessageListenerProxy(Napi::Env env, Napi::Function jsCallback, MessageListe
   Consumer *consumer = data->consumer;
   delete data;
 
-  jsCallback.Call({msg, consumer->Value()});
+  if (consumer) {

Review Comment:
   No. The initial value is `null`. And I found the NodeJS wrapper never logs any message. Even if you added a log here, there is still helpless to find in which scenario `consumer` is `null` here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org