浏览代码

Prevent assertion in TFTPFileSystem::WaitForReply when reconnecting

Source commit: d58003d90a52d8e6c53775050fed802c0fd1fb83
Martin Prikryl 5 年之前
父节点
当前提交
7cffe6e046
共有 1 个文件被更改,包括 9 次插入1 次删除
  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()