Fix WaitForConnectionAsync when NamedPipeServerStream is disposed (#52825)
authorEmmanuel André <2341261+manandre@users.noreply.github.com>
Sun, 18 Jul 2021 17:30:16 +0000 (19:30 +0200)
committerGitHub <noreply@github.com>
Sun, 18 Jul 2021 17:30:16 +0000 (13:30 -0400)
commitc5edf0e09541e2c9c4441c0abdf23f712507596c
tree175b424bc7fb2d9cc1cf6c8ed262e22a935f995f
parente8be7f26cb1b32321ddf5d2449fb9b8faddab94f
Fix WaitForConnectionAsync when NamedPipeServerStream is disposed (#52825)

* Fix WaitForConnectionAsync when NamedPipeServerStream is disposed

* Align Unix implementation on broken pipe IO exception as on Windows

* Add missing methods to test against ObjectDisposedException

* Apply suggestions from code review

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Rebase and fix suggestions

* Cancel Accept on dispose

* Improve test

* Apply suggestions from code review

Co-authored-by: Stephen Toub <stoub@microsoft.com>
src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Unix.cs
src/libraries/System.IO.Pipes/tests/PipeStreamConformanceTests.cs