Vanlightly opened a new pull request #11486: URL: https://github.com/apache/pulsar/pull/11486
Fixes #11485 ### Motivation Multiple endpoints, for example "localhost", "127.0.0.1", need to be iterated over before a connection succeeds. In each iteration the connectTimeoutTask (PeriodicTask) is stopped and started. Stopping it cancels the timer, which fires the handler (handleTimeout) which in turn calls the connect timeout callback which closes the socket. This causes the createProducerAsync to return ResultConnectError. ### Modifications This change checks the error_code in the PeriodicTask timer handler and returns if it is operation_cancelled, avoiding erroneously calling the callback. ### Verifying this change All existing tests pass. ### Does this pull request potentially affect one of the following parts: None ### Documentation #### For contributor For this PR, do we need to update docs? - No, because this is a minor fix to an internal operation. -- 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]
