浏览代码

Bug 1991: No error message is sometimes shown when SFTP server disconnects

https://winscp.net/tracker/1991

Source commit: 83e9fce025e09a9e9fe12763709ff50613c6051b
Martin Prikryl 4 年之前
父节点
当前提交
d377990775
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      source/core/SecureShell.cpp

+ 1 - 1
source/core/SecureShell.cpp

@@ -1709,7 +1709,6 @@ void __fastcall TSecureShell::Discard()
   bool WasActive = FActive;
   bool WasActive = FActive;
   FActive = false;
   FActive = false;
   FOpened = false;
   FOpened = false;
-  FClosed = true;
 
 
   if (WasActive)
   if (WasActive)
   {
   {
@@ -1721,6 +1720,7 @@ void __fastcall TSecureShell::Close()
 {
 {
   LogEvent(L"Closing connection.");
   LogEvent(L"Closing connection.");
   DebugAssert(FActive);
   DebugAssert(FActive);
+  FClosed = true;
 
 
   // Without main channel SS_EOF is ignored and would get stuck waiting for exit code.
   // Without main channel SS_EOF is ignored and would get stuck waiting for exit code.
   if ((backend_exitcode(FBackendHandle) < 0) && winscp_query(FBackendHandle, WINSCP_QUERY_MAIN_CHANNEL))
   if ((backend_exitcode(FBackendHandle) < 0) && winscp_query(FBackendHandle, WINSCP_QUERY_MAIN_CHANNEL))