BewareMyPower opened a new pull request, #521:
URL: https://github.com/apache/pulsar-client-cpp/pull/521

   Fixes https://github.com/apache/pulsar-client-cpp/issues/513
   
   ### Motivation
   
   When a `ClientImpl` object is destructed, the `LookupService` object pointed 
by the `lookupServicePtr_` field will be destructed. However, if there is a 
pending lookup operation in `RetryableOperation`, it could access the 
destructed `RetryableLookupService::lookupService_` field, which is null.
   
   ### Modifications
   
   - Call `RetryableLookupService::close` in `ClientImpl::shutdown`. Improve 
`RetryableOperationCache::close` to fail any new operation with 
`ResultAlreadyClosed` after `close` is called.
   - Add `ResultAlreadyClosed` to the fatal result list so that 
`RetryableOperation` won't retry for this error code.
   - Add `testAfterClientShutdown` to verify the pending lookup operation will 
fail with `ResultDisconnected` after `shutdown` is called because the timer is 
cancelled.
   - Add `testRetryAfterDestroyed` to verify any further operation will fail 
with `ResultAlreadyClosed` after `RetryableLookupService::close`.


-- 
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