diff --git a/include/amqpcpp/linux_tcp/tcpconnection.h b/include/amqpcpp/linux_tcp/tcpconnection.h index 6167f79..a8dae17 100644 --- a/include/amqpcpp/linux_tcp/tcpconnection.h +++ b/include/amqpcpp/linux_tcp/tcpconnection.h @@ -192,9 +192,8 @@ public: * Constructor * @param handler User implemented handler object * @param hostname The address to connect to - * @param random Randomly select one of the IP addresses that belong to the hostname */ - TcpConnection(TcpHandler *handler, const Address &address, bool random = false); + TcpConnection(TcpHandler *handler, const Address &address); /** * No copying diff --git a/src/linux_tcp/tcpconnection.cpp b/src/linux_tcp/tcpconnection.cpp index 316fd0e..70b4035 100644 --- a/src/linux_tcp/tcpconnection.cpp +++ b/src/linux_tcp/tcpconnection.cpp @@ -23,11 +23,10 @@ namespace AMQP { * Constructor * @param handler User implemented handler object * @param hostname The address to connect to - * @param random Randomly select one of the IP addresses that belong to the hostname */ -TcpConnection::TcpConnection(TcpHandler *handler, const Address &address, bool random) : +TcpConnection::TcpConnection(TcpHandler *handler, const Address &address) : _handler(handler), - _state(new TcpResolver(this, address.hostname(), address.port(), address.secure(), address.option("connectTimeout", 5), random)), + _state(new TcpResolver(this, address.hostname(), address.port(), address.secure(), address.option("connectTimeout", 5), address.option("randomConnect", false))), _connection(this, address.login(), address.vhost()) { // tell the handler