Pārlūkot izejas kodu

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

Source commit: 0ed6aaf3d8fe6f5e096ab44e66462cbf3d70ed62
Martin Prikryl 7 gadi atpakaļ
vecāks
revīzija
436f40124b
1 mainītis faili ar 11 papildinājumiem un 0 dzēšanām
  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)