1
0
mirror of https://github.com/winscp/winscp.git synced 2026-10-24 02:28:55 +03:00

Deadlock when TLS connection is lost

Source commit: 9561e7b58ff3a659c8eff1152efee28bf09d96e5
This commit is contained in:
Martin Prikryl
2021-10-12 13:44:50 +00:00
parent f18efb0420
commit 5d68c005f1
2 changed files with 2 additions and 2 deletions

View File

@@ -118,6 +118,7 @@ protected:
int SendNext(const void * lpBuf, int nBufLen, int nFlags = 0);
CAsyncSocketEx *m_pOwnerSocket;
int m_nCriticalError;
// Calls OnLayerCallback on owner socket
int DoLayerCallback(int nType, int nParam1, int nParam2, char * str = 0);
@@ -154,7 +155,6 @@ private:
void CallEvent(int nEvent, int nErrorCode);
int m_nPendingEvents;
int m_nCriticalError;
void Init(CAsyncSocketExLayer * pPrevLayer, CAsyncSocketEx * pOwnerSocket);
CAsyncSocketExLayer * AddLayer(CAsyncSocketExLayer * pLayer, CAsyncSocketEx * pOwnerSocket);

View File

@@ -606,7 +606,7 @@ int CAsyncSslSocketLayer::Receive(void* lpBuf, int nBufLen, int nFlags)
void CAsyncSslSocketLayer::Close()
{
if (!m_nShutDown && m_bSslEstablished)
if (!m_nShutDown && m_bSslEstablished && !m_nCriticalError)
{
ShutDown();
while (!ShutDownComplete())