Vanlightly opened a new issue #11485:
URL: https://github.com/apache/pulsar/issues/11485


   **Describe the bug**
   C++ client tests are failing with ConnectError on my Mac (BigSur).
   
   On my machine, multiple endpoints ("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.
   
   The PeriodicTask::handleTimeout should check the error code and if it is 
operation_cancelled it should return (not call the callback which closes the 
socket). 
   
   **To Reproduce**
   Run the tests, for example BasicEndToEndTest, testBatchMessages from a 
machine that iterates over "localhost" and "127.0.0.1" endpoints. See the test 
fail with ConnectError
   
   **Expected behavior**
   The connection to the second endpoint, 127.0.0.1, to succeed.
   
   I have a patch coming.
   


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