diff options
Diffstat (limited to 'cpp/src/Ice/SslConnectionOpenSSLServer.cpp')
-rw-r--r-- | cpp/src/Ice/SslConnectionOpenSSLServer.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/cpp/src/Ice/SslConnectionOpenSSLServer.cpp b/cpp/src/Ice/SslConnectionOpenSSLServer.cpp index 3cd05384efc..a2df6549699 100644 --- a/cpp/src/Ice/SslConnectionOpenSSLServer.cpp +++ b/cpp/src/Ice/SslConnectionOpenSSLServer.cpp @@ -282,19 +282,15 @@ IceSecurity::Ssl::OpenSSL::ServerConnection::write(Buffer& buf, int timeout) } #endif + int initReturn = 0; + // We keep writing 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; |