[Mono.Security]: Test suite - we may not throw IOException as well here.
authorMartin Baulig <martin.baulig@xamarin.com>
Thu, 15 Jan 2015 16:52:18 +0000 (17:52 +0100)
committerMartin Baulig <martin.baulig@xamarin.com>
Thu, 15 Jan 2015 16:53:57 +0000 (17:53 +0100)
In fact, we should not ever throw ObjectDisposedException, but provide a
meaningful IOException.  Still working on it.

mcs/class/System/Test/System.Net.Security/SslStreamTest.cs

index c9b067ef6ba987fa378ac6db6ac1a1d849e0c784..39849d5bef9bc9c8db77d9fd0bf1a61c23ae4aa9 100644 (file)
@@ -177,7 +177,11 @@ public class SslStreamTest {
                                                (a1, a2, a3, a4, a5) => m_clientCert);
                        state.ClientStream.AuthenticateAsClient ("test_host");
                        state.ClientAuthenticated.Set ();
-               } catch (ObjectDisposedException) { /* this can happen when closing connection it's irrelevant for the test result*/}
+               } catch (ObjectDisposedException) { /* this can happen when closing connection it's irrelevant for the test result*/
+               } catch (IOException) {
+                       if (!state.ServerIOException)
+                               throw;
+               }
        }
 
        private void StartServerAndAuthenticate (ClientServerState state) {