Преглед на файлове

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

https://winscp.net/tracker/1991
(cherry picked from commit d37799077599cc300b9c78420579b052055bf508)

Source commit: d86b154627e1fafc1ac6852b95df5b11ffc4a4ad
Martin Prikryl преди 4 години
родител
ревизия
fa7be585e6
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      source/core/SecureShell.cpp

+ 1 - 1
source/core/SecureShell.cpp

@@ -1704,7 +1704,6 @@ void __fastcall TSecureShell::Discard()
   bool WasActive = FActive;
   FActive = false;
   FOpened = false;
-  FClosed = true;
 
   if (WasActive)
   {
@@ -1716,6 +1715,7 @@ void __fastcall TSecureShell::Close()
 {
   LogEvent(L"Closing connection.");
   DebugAssert(FActive);
+  FClosed = true;
 
   // 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))