diff options
author | Marek Safar <marek.safar@gmail.com> | 2016-10-14 17:23:44 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2016-10-14 17:24:21 +0300 |
commit | fbc8e9daafe5cb81c7415a21e250251732d1757b (patch) | |
tree | ee335ef1ad999791f3ca843bafd934b0f17be2cb /mcs/class/System.ServiceModel | |
parent | d70b715a96c81e620a0c5ff866e9b65dbcd7fee1 (diff) |
[System.ServiceModel] Hide only relevant exceptions in TcpChannelListener.cs
Diffstat (limited to 'mcs/class/System.ServiceModel')
-rw-r--r-- | mcs/class/System.ServiceModel/System.ServiceModel.Channels.NetTcp/TcpChannelListener.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels.NetTcp/TcpChannelListener.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels.NetTcp/TcpChannelListener.cs index 9fc6f5d9217..598ce394029 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels.NetTcp/TcpChannelListener.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels.NetTcp/TcpChannelListener.cs @@ -201,13 +201,13 @@ namespace System.ServiceModel.Channels.NetTcp if (accept_handles.Count > 0) accept_handles [0].Set (); } - } catch { + } catch (ObjectDisposedException) { /* If an accept fails, just ignore it. Maybe the remote peer disconnected already */ } finally { if (State == CommunicationState.Opened) { try { listener.BeginAcceptTcpClient (TcpListenerAcceptedClient, listener); - } catch { + } catch (ObjectDisposedException) { /* If this fails, we must have disposed the listener */ } } |