Skip to content

Commit 200dada

Browse files
authored
Do not throw non local exceptions from TcpAcceptor (#2704)
1 parent a3f30c3 commit 200dada

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

csharp/src/Ice/Internal/TcpAcceptor.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public virtual bool startAccept(AsyncCallback callback, object state)
5252
},
5353
state);
5454
}
55-
catch (System.Net.Sockets.SocketException ex)
55+
catch (System.Exception ex)
5656
{
5757
throw new Ice.SocketException(ex);
5858
}
@@ -68,9 +68,9 @@ public virtual void finishAccept()
6868
{
6969
_acceptFd = _fd.EndAccept(_result);
7070
}
71-
catch (System.Net.Sockets.SocketException ex)
71+
catch (System.Exception ex)
7272
{
73-
_acceptError = ex;
73+
_acceptError = new Ice.SocketException(ex);
7474
}
7575
}
7676
}
@@ -143,7 +143,7 @@ internal TcpAcceptor(TcpEndpointI endpoint, ProtocolInstance instance, string ho
143143
private ProtocolInstance _instance;
144144
private Socket _fd;
145145
private Socket _acceptFd;
146-
private System.Exception _acceptError;
146+
private Ice.SocketException _acceptError;
147147
private int _backlog;
148148
private IPEndPoint _addr;
149149
private IAsyncResult _result;

0 commit comments

Comments
 (0)