shibd commented on code in PR #16969:
URL: https://github.com/apache/pulsar/pull/16969#discussion_r945570987
##########
pulsar-client-cpp/lib/MultiTopicsConsumerImpl.cc:
##########
@@ -712,7 +738,19 @@ void MultiTopicsConsumerImpl::seekAsync(const MessageId&
msgId, ResultCallback c
}
void MultiTopicsConsumerImpl::seekAsync(uint64_t timestamp, ResultCallback
callback) {
- callback(ResultOperationNotSupported);
+ Lock stateLock(mutex_);
+ if (state_ != Ready) {
+ stateLock.unlock();
+ callback(ResultAlreadyClosed);
+ return;
+ }
+ // consumers_ could only be modified when state_ is Ready, so we needn't
lock consumersMutex_ here
Review Comment:
Thanks, fixed.
--
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]