Skip to content

Commit

Permalink
Fix sporadic double fd close
Browse files Browse the repository at this point in the history
  • Loading branch information
danmoseley authored Jun 24, 2021
1 parent dae9156 commit 14b2cfb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void ThrowsObjectDisposedExceptionForDisposedHandle()
public void ThrowsNotSupportedExceptionForUnseekableFile()
{
using (var server = new AnonymousPipeServerStream(PipeDirection.Out))
using (SafeFileHandle handle = new SafeFileHandle(server.SafePipeHandle.DangerousGetHandle(), true))
using (SafeFileHandle handle = new SafeFileHandle(server.SafePipeHandle.DangerousGetHandle(), ownsHandle: false))
{
Assert.Throws<NotSupportedException>(() => MethodUnderTest(handle, Array.Empty<byte>(), 0));
}
Expand Down

0 comments on commit 14b2cfb

Please sign in to comment.