BewareMyPower opened a new pull request #8232:
URL: https://github.com/apache/pulsar/pull/8232


   Fixes #8230
   
   ### Motivation
   
   When `ClientConnection` calls `close`, some promises of pending request were 
not completed. It may cause some methods that wait for promise become completed 
never return, like `Reader::hasMessageAvailable`.
   
   ### Modifications
   
   - Complete `GetLastMessageId` and `GetNamespaceTopics` requests in 
`ClientConnection::close`.
   - Refactor `ClientConnection::close`, use move instead of swap to process 
some fields outside the lock section.
   - Add error log before connection was closed by read error.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   Try to reproduce #8230 , `Reader::hasMessageAvailable` would return 
`ResultConnectError` if broker was killed by force.


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


Reply via email to