瀏覽代碼

Bug 2195: Ignore disconnects from the server while closing the connection

https://winscp.net/tracker/2195

Source commit: 4727939d067e9ba8140d50cd476c2c2d8ff9b134
Martin Prikryl 2 年之前
父節點
當前提交
3d27a5f88d
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      source/core/SecureShell.cpp

+ 8 - 1
source/core/SecureShell.cpp

@@ -1803,7 +1803,14 @@ void inline __fastcall TSecureShell::CheckConnection(int Message)
     {
       Str += L" " + FMTLOAD(SSH_EXITCODE, (ExitCode));
     }
-    FatalError(Str, HelpKeyword);
+    if (!FClosed)
+    {
+      FatalError(Str, HelpKeyword);
+    }
+    else
+    {
+      LogEvent(FORMAT(L"Ignoring closed connection: %s", (Str)));
+    }
   }
 }
 //---------------------------------------------------------------------------