소스 검색

Proper TLS shutdown

Source commit: 86a380532057c0d913678b9ca910cb319a8f422c
Martin Prikryl 4 년 전
부모
커밋
268f63557e
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      source/filezilla/AsyncSslSocketLayer.cpp

+ 8 - 0
source/filezilla/AsyncSslSocketLayer.cpp

@@ -606,6 +606,14 @@ int CAsyncSslSocketLayer::Receive(void* lpBuf, int nBufLen, int nFlags)
 
 void CAsyncSslSocketLayer::Close()
 {
+  if (!m_nShutDown)
+  {
+    ShutDown();
+    while (!ShutDownComplete())
+    {
+      OnSend(0);
+    }
+  }
   m_nShutDown = 0;
   m_onCloseCalled = false;
   ResetSslSession();