diff --git a/src/lib/plugin/ns/SecureSocket.cpp b/src/lib/plugin/ns/SecureSocket.cpp index 0f66e8cd..c262a362 100644 --- a/src/lib/plugin/ns/SecureSocket.cpp +++ b/src/lib/plugin/ns/SecureSocket.cpp @@ -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: diff --git a/src/lib/synergy/ClientApp.cpp b/src/lib/synergy/ClientApp.cpp index 30826036..a6b297ac 100644 --- a/src/lib/synergy/ClientApp.cpp +++ b/src/lib/synergy/ClientApp.cpp @@ -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(); }