Skip to content

Commit

Permalink
Fix sporadic double fd close (#54660)
Browse files Browse the repository at this point in the history
Fix #54589
  • Loading branch information
danmoseley authored Jun 24, 2021
1 parent 4facc36 commit f55390a
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 f55390a

Please sign in to comment.