summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorAnthony Neal <aneal@zeroc.com>2003-12-12 16:59:46 +0000
committerAnthony Neal <aneal@zeroc.com>2003-12-12 16:59:46 +0000
commit5db504a80277bd88f9866d616bbbf8308cbf442c (patch)
tree6ccbfe7fc69cc7149720f5528b58427c65a1d9b4 /cpp/src
parentModifications made to: (diff)
downloadice-5db504a80277bd88f9866d616bbbf8308cbf442c.tar.bz2
ice-5db504a80277bd88f9866d616bbbf8308cbf442c.tar.xz
ice-5db504a80277bd88f9866d616bbbf8308cbf442c.zip
Comments explaining why we have handshake timeouts set to a min of 5s and
why we do in-transceiver retries.
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IceSSL/Context.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/cpp/src/IceSSL/Context.cpp b/cpp/src/IceSSL/Context.cpp
index 6edb2294fc1..eef654b3e7e 100644
--- a/cpp/src/IceSSL/Context.cpp
+++ b/cpp/src/IceSSL/Context.cpp
@@ -611,8 +611,18 @@ void
IceSSL::Context::transceiverSetup(const SslTransceiverPtr& transceiver, int timeout)
{
// This timeout is implemented once on the first read after hanshake.
+ //
+ // Note: This is here because of some strange issue where SSL sometimes has long pauses
+ // during handshake which cause timeouts. If the IceSSL timeout is less than 5s,
+ // there is a possibility (increasing in probability as you set the timeout lower)
+ // that the handshake will faile due to a timeout.
+ //
transceiver->setHandshakeReadTimeout(timeout < 5000 ? 5000 : timeout);
+ // Note: Likewise, because the handshake has to be completed by a single thread, we do
+ // handshake retries in the Transceiver. This is obviously not what we'd like, but
+ // this is due to the way the OpenSSL library handles handshaking.
+ //
int retries = _communicator->getProperties()->getPropertyAsIntWithDefault(_connectionHandshakeRetries, 10);
transceiver->setHandshakeRetries(retries);
}