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 2020/03/27 10:59:47 UTC

[GitHub] [pulsar-client-node] massakam commented on a change in pull request #83: Consumer with message listener dies after some time

massakam commented on a change in pull request #83: Consumer with message listener dies after some time
URL: https://github.com/apache/pulsar-client-node/pull/83#discussion_r399184975
 
 

 ##########
 File path: src/Consumer.cc
 ##########
 @@ -45,8 +46,48 @@ void Consumer::Init(Napi::Env env, Napi::Object exports) {
   constructor.SuppressDestruct();
 }
 
+struct MessageListenerProxyData {
+  Consumer *consumer;
+  pulsar_message_t *cMessage;
 
 Review comment:
   `cMessage` should be declared before `consumer`. Otherwise, you will get warnings when compiling.
   ```
   ../src/Consumer.cc:51:21: warning: ‘MessageListenerProxyData::cMessage’ will be initialized after [-Wreorder]
      pulsar_message_t *cMessage;
                        ^
   ../src/Consumer.cc:50:13: warning:   ‘Consumer* MessageListenerProxyData::consumer’ [-Wreorder]
      Consumer *consumer;
                ^
   ../src/Consumer.cc:53:3: warning:   when initialized here [-Wreorder]
      MessageListenerProxyData(pulsar_message_t *cMessage, Consumer *consumer)
      ^
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services