From 47b285eac9b919cb1fc5eca4a162267f507c3890 Mon Sep 17 00:00:00 2001 From: Jon Purdy Date: Wed, 13 Sep 2017 17:09:19 -0700 Subject: [PATCH] Fix bug 4786 test. The fix in #5501 had a scoping error causing `make check` to fail. --- mcs/class/Mono.Data.Tds/Test/bug-4786.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mcs/class/Mono.Data.Tds/Test/bug-4786.cs b/mcs/class/Mono.Data.Tds/Test/bug-4786.cs index ed44567b40d..dbb28b32af0 100644 --- a/mcs/class/Mono.Data.Tds/Test/bug-4786.cs +++ b/mcs/class/Mono.Data.Tds/Test/bug-4786.cs @@ -45,6 +45,8 @@ namespace MonoTests.Mono.Data.Tds public void CheckNullException() { + TcpListener Listener = null; + //set up dummy sql listener, if there is a real sql server on this //machine at that port, in theory this part will fail, but that's ok //becuase something will be listening on the port and that's all we @@ -53,7 +55,7 @@ namespace MonoTests.Mono.Data.Tds try{ IPAddress hostIP =Dns.GetHostEntry("localhost").AddressList[0]; IPEndPoint ep = new IPEndPoint(hostIP, 1433); - TcpListener Listener = new TcpListener (ep); + Listener = new TcpListener (ep); Listener.Start (); } catch (Exception){ //ignore -- 2.25.1