@@ -118,20 +118,21 @@ void AsioConnectionHandler::connect(const AMQP::Address& address)
118
118
119
119
void AsioConnectionHandler::connect (asio::ip::tcp::resolver::iterator endpoint_iterator)
120
120
{
121
- asio::async_connect (this ->underlying_socket (), endpoint_iterator, asio::ip::tcp::resolver::iterator (),
122
- [this ](const auto & error, auto successful_endpoint) {
123
- if (error)
124
- {
125
- log::error (" [{}] Failed to connect to: {}" , name_, error.message ());
126
- this ->onError (" Connect failed" );
127
- return ;
128
- }
129
- log::debug (" [{}] Established connection to {} at {}" , name_,
130
- successful_endpoint->host_name (),
131
- successful_endpoint->endpoint ());
132
-
133
- this ->handshake (successful_endpoint->host_name ());
134
- });
121
+ asio::async_connect (
122
+ this ->underlying_socket (), endpoint_iterator, asio::ip::tcp::resolver::iterator (),
123
+ [this ](const std::error_code& error,
124
+ asio::ip::tcp::resolver::iterator successful_endpoint) {
125
+ if (error)
126
+ {
127
+ log::error (" [{}] Failed to connect to: {}" , name_, error.message ());
128
+ this ->onError (" Connect failed" );
129
+ return ;
130
+ }
131
+ log::debug (" [{}] Established connection to {} at {}" , name_,
132
+ successful_endpoint->host_name (), successful_endpoint->endpoint ());
133
+
134
+ this ->handshake (successful_endpoint->host_name ());
135
+ });
135
136
}
136
137
137
138
void PlainConnectionHandler::handshake (const std::string& hostname)
0 commit comments