summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/SslConnectionOpenSSLClient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/SslConnectionOpenSSLClient.cpp')
-rw-r--r--cpp/src/Ice/SslConnectionOpenSSLClient.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/cpp/src/Ice/SslConnectionOpenSSLClient.cpp b/cpp/src/Ice/SslConnectionOpenSSLClient.cpp
index 88a1fc0547b..093854fb46d 100644
--- a/cpp/src/Ice/SslConnectionOpenSSLClient.cpp
+++ b/cpp/src/Ice/SslConnectionOpenSSLClient.cpp
@@ -259,19 +259,15 @@ IceSecurity::Ssl::OpenSSL::ClientConnection::write(Buffer& buf, int timeout)
}
#endif
+ int initReturn = 0;
+
// We keep reading until we're done
while (buf.i != buf.b.end())
{
// Ensure we're initialized.
- int initReturn = initialize(timeout);
-
- if (initReturn == -1)
- {
- // Handshake underway, we should just return with what we've got (even if that's nothing).
- break;
- }
+ initReturn = initialize(timeout);
- if (initReturn == 0)
+ if (initReturn <= 0)
{
// Retry the initialize call
continue;