Browse Source

Prevent assertion in TFTPFileSystem::WaitForReply when reconnecting

Source commit: d58003d90a52d8e6c53775050fed802c0fd1fb83
Martin Prikryl 5 năm trước cách đây
mục cha
commit
7cffe6e046
1 tập tin đã thay đổi với 9 bổ sung1 xóa
  1. 9 1
      source/core/FtpFileSystem.cpp

+ 9 - 1
source/core/FtpFileSystem.cpp

@@ -2800,7 +2800,15 @@ bool __fastcall TFTPFileSystem::ProcessMessage()
 //---------------------------------------------------------------------------
 void __fastcall TFTPFileSystem::DiscardMessages()
 {
-  while (ProcessMessage());
+  try
+  {
+    while (ProcessMessage());
+  }
+  __finally
+  {
+    FReply = 0;
+    FCommandReply = 0;
+  }
 }
 //---------------------------------------------------------------------------
 void __fastcall TFTPFileSystem::WaitForMessages()