浏览代码

Adding forgotten implementation of PatientFileStream.Close method (should have been in 956ca5bfe8)

Source commit: 0ed6aaf3d8fe6f5e096ab44e66462cbf3d70ed62
Martin Prikryl 7 年之前
父节点
当前提交
436f40124b
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11 0
      dotnet/internal/PatientFileStream.cs

+ 11 - 0
dotnet/internal/PatientFileStream.cs

@@ -10,6 +10,17 @@ namespace WinSCP
             _session = session;
         }
 
+        override public void Close()
+        {
+            if (_stream != null)
+            {
+                _stream.Close();
+                _stream = null;
+            }
+
+            base.Close();
+        }
+
         private const int InitialInterval = 50;
 
         public override int Read(byte[] array, int offset, int count)