wsz94 commented on a change in pull request #17643:
URL: https://github.com/apache/flink/pull/17643#discussion_r742503458



##########
File path: 
flink-connectors/flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/source/reader/split/PulsarPartitionSplitReaderBase.java
##########
@@ -114,6 +116,9 @@ protected PulsarPartitionSplitReaderBase(
             try {
                 Duration timeout = deadline.timeLeftIfAny();
                 Message<byte[]> message = pollMessage(timeout);
+                if (message == null) {
+                    break;
+                }
 
                 // Deserialize message.
                 collector.setMessage(message);

Review comment:
       `Duration timeout = deadline.timeLeftIfAny()`  indicates that it met the 
for loop condition `deadline.hasTimeLeft()`. So we should take another poll.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to