TCPListener doesn't create a new socket on Stop (dotnet/corefx#41547)
authorAlexander Nikolaev <55398552+alnikola@users.noreply.github.com>
Thu, 10 Oct 2019 11:59:12 +0000 (13:59 +0200)
committerGitHub <noreply@github.com>
Thu, 10 Oct 2019 11:59:12 +0000 (13:59 +0200)
commit5e20e0264dae370a3155d80ed9e5b8c5fb587575
treed25943736b6ea19764c1bede11ef5f878f421285
parent6adeb9be609b013e16cc50d435bea9f0eb3bd8e2
TCPListener doesn't create a new socket on Stop (dotnet/corefx#41547)

TCPListener.Stop disposes the socket and resets the reference. New socket is created only on the next Start call or Server property access.
Fixes dotnet/corefx#26170

Commit migrated from https://github.com/dotnet/corefx/commit/c5edb254b85819d4cd4fd6ce35ebb6acc53f450d
src/libraries/System.Net.Sockets/src/System/Net/Sockets/TCPListener.cs
src/libraries/System.Net.Sockets/tests/FunctionalTests/TcpListenerTest.cs