diff options
author | Marc Laukien <marc@zeroc.com> | 2002-06-27 22:27:30 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-06-27 22:27:30 +0000 |
commit | 00353fc7b5549d23effdebabcfa2b38b5156f23a (patch) | |
tree | 1971293455ebc72318efc20814f3940a2395e187 /cpp/src/Ice/ConnectionFactory.cpp | |
parent | make depend (diff) | |
download | ice-00353fc7b5549d23effdebabcfa2b38b5156f23a.tar.bz2 ice-00353fc7b5549d23effdebabcfa2b38b5156f23a.tar.xz ice-00353fc7b5549d23effdebabcfa2b38b5156f23a.zip |
removed backlog cleanup code
Diffstat (limited to 'cpp/src/Ice/ConnectionFactory.cpp')
-rw-r--r-- | cpp/src/Ice/ConnectionFactory.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp index 4cfe1b2f95f..0645e0dee39 100644 --- a/cpp/src/Ice/ConnectionFactory.cpp +++ b/cpp/src/Ice/ConnectionFactory.cpp @@ -334,9 +334,18 @@ IceInternal::IncomingConnectionFactory::message(BasicStream&, const ThreadPoolPt try { TransceiverPtr transceiver = _acceptor->accept(0); - ConnectionPtr connection = new Connection(_instance, transceiver, _endpoint, _adapter); - connection->activate(); - _connections.push_back(connection); + // Test code: We drop every 2nd connection we accept. +/* + if(++_testCount % 2) + { + transceiver->close(); + } + else +*/ { + ConnectionPtr connection = new Connection(_instance, transceiver, _endpoint, _adapter); + connection->activate(); + _connections.push_back(connection); + } } catch(const SocketException&) { @@ -371,6 +380,11 @@ IceInternal::IncomingConnectionFactory::finished(const ThreadPoolPtr& threadPool } else if(_state == StateClosed) { +// +// With the new connection validation, this code is not needed +// anymore. +// +/* try { // @@ -399,6 +413,7 @@ IceInternal::IncomingConnectionFactory::finished(const ThreadPoolPtr& threadPool out << "connection exception:\n" << ex << '\n' << _acceptor->toString(); } } +*/ _acceptor->close(); |