diff options
Diffstat (limited to 'csharp/src')
-rw-r--r-- | csharp/src/IceSSL/TransceiverI.cs | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/csharp/src/IceSSL/TransceiverI.cs b/csharp/src/IceSSL/TransceiverI.cs index f744ad3a035..1b33620948b 100644 --- a/csharp/src/IceSSL/TransceiverI.cs +++ b/csharp/src/IceSSL/TransceiverI.cs @@ -47,10 +47,24 @@ namespace IceSSL if(_sslStream == null) { - _sslStream = new SslStream(new NetworkStream(_delegate.fd(), false), - false, - new RemoteCertificateValidationCallback(validationCallback), - new LocalCertificateSelectionCallback(selectCertificate)); + try + { + _sslStream = new SslStream(new NetworkStream(_delegate.fd(), false), + false, + new RemoteCertificateValidationCallback(validationCallback), + new LocalCertificateSelectionCallback(selectCertificate)); + } + catch(IOException ex) + { + if(IceInternal.Network.connectionLost(ex)) + { + throw new Ice.ConnectionLostException(ex); + } + else + { + throw new Ice.SocketException(ex); + } + } return IceInternal.SocketOperation.Connect; } |