diff options
author | monojenkins <jo.shields+jenkins@xamarin.com> | 2016-01-29 17:50:15 +0300 |
---|---|---|
committer | monojenkins <jo.shields+jenkins@xamarin.com> | 2016-01-29 17:50:15 +0300 |
commit | 02d4680c096b6fc343fbe6efd164e265ea319ffe (patch) | |
tree | b1a4105d47ce9cdb3559f89887bef591d7bbaba5 /mcs/class/System/Test/System.Net.Sockets/TcpClientTest.cs | |
parent | 5bb760e65fa5e793f33d6586d0241fa9ac6f53fc (diff) | |
parent | 08aa9adece3e549b85d9cd9551f6bbfda1f33564 (diff) |
Merge pull request #2522 from ludovic-henry/test-socketresponder-task
[SocketResponder] Use Task instead of Thread + Use explicit delegate so it appears in stacktraces
Diffstat (limited to 'mcs/class/System/Test/System.Net.Sockets/TcpClientTest.cs')
-rw-r--r-- | mcs/class/System/Test/System.Net.Sockets/TcpClientTest.cs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/mcs/class/System/Test/System.Net.Sockets/TcpClientTest.cs b/mcs/class/System/Test/System.Net.Sockets/TcpClientTest.cs index d4769eb811b..fb9025b2310 100644 --- a/mcs/class/System/Test/System.Net.Sockets/TcpClientTest.cs +++ b/mcs/class/System/Test/System.Net.Sockets/TcpClientTest.cs @@ -78,9 +78,7 @@ namespace MonoTests.System.Net.Sockets public void CloseTest () { IPEndPoint localEP = new IPEndPoint (IPAddress.Loopback, 8765); - using (SocketResponder sr = new SocketResponder (localEP, new SocketRequestHandler (CloseRequestHandler))) { - sr.Start (); - + using (SocketResponder sr = new SocketResponder (localEP, s => CloseRequestHandler (s))) { TcpClient tcpClient = new TcpClient (IPAddress.Loopback.ToString (), 8765); NetworkStream ns = tcpClient.GetStream (); Assert.IsNotNull (ns, "#A1"); @@ -105,9 +103,7 @@ namespace MonoTests.System.Net.Sockets */ } - using (SocketResponder sr = new SocketResponder (localEP, new SocketRequestHandler (CloseRequestHandler))) { - sr.Start (); - + using (SocketResponder sr = new SocketResponder (localEP, s => CloseRequestHandler (s))) { TcpClient tcpClient = new TcpClient (IPAddress.Loopback.ToString (), 8765); Assert.AreEqual (0, tcpClient.Available, "#B1"); Assert.IsTrue (tcpClient.Connected, "#B2"); |