[bcl] Catch exceptions thrown by SerialPortStream.Dispose () when called from the...
authorZoltan Varga <vargaz@gmail.com>
Fri, 29 Aug 2014 19:06:25 +0000 (15:06 -0400)
committerZoltan Varga <vargaz@gmail.com>
Fri, 29 Aug 2014 19:06:25 +0000 (15:06 -0400)
mcs/class/System/System.IO.Ports/SerialPortStream.cs

index dd4ac22f98b437552f13b1b52b35a3f9461c1be7..b9bac7306682880011612d11c10242988abe660c 100644 (file)
@@ -211,7 +211,10 @@ namespace System.IO.Ports
 
                ~SerialPortStream ()
                {
-                       Dispose (false);
+                       try {
+                               Dispose (false);
+                       } catch (IOException) {
+                       }
                }
 
                void CheckDisposed ()