BewareMyPower opened a new pull request #8486:
URL: https://github.com/apache/pulsar/pull/8486
### Motivation
Boost asio `socket::remote_point` may throw `boost::system::system_error` on
failure. If the C++ client library was compiled with some low version boost,
like 1.54, even if `async_connect` success, the server could still be
unreachable and an exception would be thrown by `socket_->remote_endpoint()`.
### Modifications
- Catch the exception for `socket_->remote_endpoint()`
- Add tests for when client connects to a unreachable service url
- Fix header dependency because some boost *.hpp file doesn't include
assert.h
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
This change added tests and can be verified as follows:
- Run `testServerConnectError`.
----------------------------------------------------------------
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]