Restore exception compatibility in TcpListener.EndAccept*** (#41745)
authorAnton Firszov <Anton.Firszov@microsoft.com>
Mon, 7 Sep 2020 12:51:11 +0000 (14:51 +0200)
committerGitHub <noreply@github.com>
Mon, 7 Sep 2020 12:51:11 +0000 (14:51 +0200)
commit2fa4e6d4798e642ab900744b293a4e5860abd54e
tree748d24f7e5001e58c669cc4d43abdf8a77e3899f
parenta84720cb68b940374e1955783ad55abb119e2fd3
Restore exception compatibility in TcpListener.EndAccept*** (#41745)

According to the old (pre- #40476) code and the documentation, we should throw ObjectDisposedException in EndAcceptSocket and EndAcceptTcpClient.

Fixes #41585
src/libraries/System.Net.Sockets/src/System/Net/Sockets/TCPListener.cs
src/libraries/System.Net.Sockets/tests/FunctionalTests/TcpListenerTest.cs