handled SSL connect failed on client side #4313

This commit is contained in:
XinyuHou 2015-02-02 15:33:40 +00:00
parent 10e6b5ad63
commit 3aa6bed669
2 changed files with 5 additions and 3 deletions

View File

@ -59,9 +59,9 @@ SecureSocket::SecureSocket(
SecureSocket::~SecureSocket()
{
SSL_shutdown(m_ssl->m_ssl);
if (m_ssl->m_ssl != NULL) {
SSL_shutdown(m_ssl->m_ssl);
SSL_free(m_ssl->m_ssl);
m_ssl->m_ssl = NULL;
}
@ -308,8 +308,10 @@ SecureSocket::checkResult(int n)
case SSL_ERROR_SSL:
// a failure in the SSL library occurred
LOG((CLOG_DEBUG2 "SSL_ERROR_SSL"));
sendEvent(getEvents()->forISocket().disconnected());
sendEvent(getEvents()->forIStream().inputShutdown());
showError();
retry = true;
break;
default:

View File

@ -326,7 +326,7 @@ ClientApp::handleClientDisconnected(const Event&, void*)
m_events->addEvent(Event(Event::kQuit));
}
else if (!m_suspended) {
m_client->connect();
scheduleClientRestart(nextRestartTimeout());
}
updateStatus();
}