Skip to content

Commit

Permalink
Double close now throws an exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfreilly committed May 11, 2008
1 parent 84f7d25 commit 1cd3933
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/TestSupport/Streams.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 1cd3933

Please sign in to comment.