Don't return a shared CFProxy instance
authorJeffrey Stedfast <jeff@xamarin.com>
Mon, 3 Dec 2012 18:58:43 +0000 (13:58 -0500)
committerJeffrey Stedfast <jeff@xamarin.com>
Mon, 3 Dec 2012 18:59:11 +0000 (13:59 -0500)
mcs/class/System/System.Net/MacProxy.cs

index eb279fc2c745ef9bd0629455821014f058ec8ed7..a21cf97c658412b7768c337c806372c1d9b57a4e 100644 (file)
@@ -811,7 +811,7 @@ namespace System.Net
                        
                        public Uri GetProxy (Uri targetUri)
                        {
-                               NetworkCredentials credentials = null;
+                               NetworkCredential credentials = null;
                                Uri proxy = null;
                                
                                if (targetUri == null)
@@ -873,13 +873,9 @@ namespace System.Net
                        }
                }
                
-               static CFWebProxy defaultWebProxy;
                public static IWebProxy GetDefaultProxy ()
                {
-                       if (defaultWebProxy == null)
-                               defaultWebProxy = new CFWebProxy ();
-                       
-                       return defaultWebProxy;
+                       return new CFWebProxy ();
                }
        }
 }