summary refs log tree commit diff
path: root/crypto/src/util/io/TeeInputStream.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/util/io/TeeInputStream.cs')
-rw-r--r--crypto/src/util/io/TeeInputStream.cs14
1 files changed, 9 insertions, 5 deletions
diff --git a/crypto/src/util/io/TeeInputStream.cs b/crypto/src/util/io/TeeInputStream.cs
index 373df4502..aeed3bae6 100644
--- a/crypto/src/util/io/TeeInputStream.cs
+++ b/crypto/src/util/io/TeeInputStream.cs
@@ -18,11 +18,15 @@ namespace Org.BouncyCastle.Utilities.IO
 			this.tee = tee;
 		}
 
-		public override void Close()
-		{
-			input.Close();
-			tee.Close();
-		}
+	    protected override void Dispose(bool disposing)
+	    {
+	        if (disposing)
+	        {
+	            input.Dispose();
+	            tee.Dispose();
+	        }
+	        base.Dispose(disposing);
+	    }
 
 		public override int Read(byte[] buf, int off, int len)
 		{