ShannonDing closed pull request #34: [ISSUE #33] CPullConsumer cannot pull 
message because of pullResult without nextBeginOffset
URL: https://github.com/apache/rocketmq-client-cpp/pull/34
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/extern/CPullConsumer.cpp b/src/extern/CPullConsumer.cpp
index 415bb5b4..cf7c01f5 100644
--- a/src/extern/CPullConsumer.cpp
+++ b/src/extern/CPullConsumer.cpp
@@ -173,12 +173,15 @@ Pull(CPullConsumer *consumer, const CMessageQueue *mq, 
const char *subExpression
         cppPullResult.pullStatus = BROKER_TIMEOUT;
     }
 
+    if(cppPullResult.pullStatus != BROKER_TIMEOUT){
+        pullResult.maxOffset = cppPullResult.maxOffset;
+        pullResult.minOffset = cppPullResult.minOffset;
+        pullResult.nextBeginOffset = cppPullResult.nextBeginOffset;
+    }
+
     switch (cppPullResult.pullStatus) {
         case FOUND: {
             pullResult.pullStatus = E_FOUND;
-            pullResult.maxOffset = cppPullResult.maxOffset;
-            pullResult.minOffset = cppPullResult.minOffset;
-            pullResult.nextBeginOffset = cppPullResult.nextBeginOffset;
             pullResult.size = cppPullResult.msgFoundList.size();
             PullResult *tmpPullResult = new PullResult(cppPullResult);
             pullResult.pData = tmpPullResult;


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to