mirror of
https://github.com/winscp/winscp.git
synced 2026-10-24 02:28:55 +03:00
Prevent hang when closing TLS connection after network failure
Related to2c0b486d,5d68c005. Caused by268f6355. Source commit: 095c15c2ed15e8cfd517a3aebf1665d60d6b5977
This commit is contained in:
@@ -606,10 +606,10 @@ int CAsyncSslSocketLayer::Receive(void* lpBuf, int nBufLen, int nFlags)
|
||||
|
||||
void CAsyncSslSocketLayer::Close()
|
||||
{
|
||||
if (!m_nShutDown && m_bSslEstablished && !m_nCriticalError)
|
||||
if (!m_nShutDown && m_bSslEstablished && !m_nNetworkError && !m_nCriticalError)
|
||||
{
|
||||
ShutDown();
|
||||
while (!ShutDownComplete())
|
||||
while (!ShutDownComplete() && !m_nNetworkError && !m_nCriticalError)
|
||||
{
|
||||
OnSend(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user