Handle possible exceptions thrown by Socket.Close
authorLluis Sanchez <lluis@novell.com>
Mon, 31 Jan 2011 15:32:43 +0000 (16:32 +0100)
committerLluis Sanchez <lluis@novell.com>
Mon, 31 Jan 2011 15:35:35 +0000 (16:35 +0100)
mcs/class/Mono.Posix/Mono.Remoting.Channels.Unix/UnixServerChannel.cs

index 3162d86506f7a05d1cee1392564c850ff7cc6ae7..0cbb928caa45786cbf7b7a1dec671f37bb21c8c9 100644 (file)
@@ -310,9 +310,12 @@ namespace Mono.Remoting.Channels.Unix
             }
             finally
             {
-                _stream.Close();
-                               _client.Close ();
-                _serverChannel.ReleaseConnection (Thread.CurrentThread);
+                               try {
+                       _serverChannel.ReleaseConnection (Thread.CurrentThread);
+                       _stream.Close();
+                                       _client.Close ();
+                               } catch {
+                               }
             }
         }