Add a missing lock in TlsStream::Close

fixes #6621
refs #6724
This commit is contained in:
Gunnar Beutner 2014-08-05 09:35:28 +02:00
parent 883170a806
commit f3d55848f5
1 changed files with 9 additions and 5 deletions

View File

@ -235,14 +235,18 @@ void TlsStream::Close(void)
for (int i = 0; i < 5; i++) {
int rc, err;
do {
{
boost::mutex::scoped_lock lock(m_SSLLock);
rc = SSL_shutdown(m_SSL.get());
} while (rc == 0);
if (rc > 0)
break;
if (rc == 0)
continue;
err = SSL_get_error(m_SSL.get(), rc);
if (rc > 0)
break;
err = SSL_get_error(m_SSL.get(), rc);
}
switch (err) {
case SSL_ERROR_WANT_READ: