Permalink
Browse files

Double close now throws an exception.

  • Loading branch information...
1 parent 84f7d25 commit 1cd3933c5df4e38b19b6f7ce84def90c8a4a4670 @jfreilly jfreilly committed May 11, 2008
Showing with 5 additions and 0 deletions.
  1. +5 −0 tests/TestSupport/Streams.cs
@@ -70,6 +70,11 @@ protected override void Dispose(bool disposing)
/// </summary>
public override void Close()
{
+ if( isClosed_ )
+ {
+ throw new InvalidOperationException("Already closed");
+ }
+
isClosed_=true;
base.Close();
}

0 comments on commit 1cd3933

Please sign in to comment.