diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2014-09-05 10:42:18 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2014-09-05 10:42:18 -0230 |
commit | 9786853ab2d88598021aaec5c0409d3a45a50a13 (patch) | |
tree | d64858749513c529fdb84a98d8637d19f2c125e4 /cpp/src/Ice/TcpConnector.cpp | |
parent | Minor change to JS print stack traces (diff) | |
download | ice-9786853ab2d88598021aaec5c0409d3a45a50a13.tar.bz2 ice-9786853ab2d88598021aaec5c0409d3a45a50a13.tar.xz ice-9786853ab2d88598021aaec5c0409d3a45a50a13.zip |
ICE-4891 Refactor network tracing
Diffstat (limited to 'cpp/src/Ice/TcpConnector.cpp')
-rw-r--r-- | cpp/src/Ice/TcpConnector.cpp | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/cpp/src/Ice/TcpConnector.cpp b/cpp/src/Ice/TcpConnector.cpp index 41579d374df..cf79f0dd5df 100644 --- a/cpp/src/Ice/TcpConnector.cpp +++ b/cpp/src/Ice/TcpConnector.cpp @@ -22,28 +22,10 @@ using namespace IceInternal; TransceiverPtr IceInternal::TcpConnector::connect() { - if(_instance->traceLevel() >= 2) - { - Trace out(_instance->logger(), _instance->traceCategory()); - out << "trying to establish " << _instance->protocol() << " connection to " << toString(); - } + TransceiverPtr transceiver = new TcpTransceiver(_instance, createSocket(false, _addr), _proxy, _addr, _sourceAddr); + dynamic_cast<TcpTransceiver*>(transceiver.get())->connect(); + return transceiver; - try - { - TransceiverPtr transceiver = - new TcpTransceiver(_instance, createSocket(false, _addr), _proxy, _addr, _sourceAddr); - dynamic_cast<TcpTransceiver*>(transceiver.get())->connect(); - return transceiver; - } - catch(const Ice::LocalException& ex) - { - if(_instance->traceLevel() >= 2) - { - Trace out(_instance->logger(), _instance->traceCategory()); - out << "failed to establish " << _instance->protocol() << " connection to " << toString() << "\n" << ex; - } - throw; - } } Short |