Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2009-05-07 22:13:57 +0400
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>2009-05-07 22:13:57 +0400
commitf79232a89cc25f4929d11f888fa67e8017a6299a (patch)
tree1489938ca88a6e3d53e998e96092f92fba0794c8 /mcs/class/Novell.Directory.Ldap
parent3dd42288f8b72ad4a9d7ddda821ce96a2509a5e9 (diff)
2009-05-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
* Connection.cs: if the socket is already disconnected, Shutdown will fail with a SocketException... Also, catch *all* the possible exceptions since the socket.Close method could also throw ObjectDisposedException. Fixes bug #449092. svn path=/trunk/mcs/; revision=133734
Diffstat (limited to 'mcs/class/Novell.Directory.Ldap')
-rw-r--r--mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/ChangeLog8
-rw-r--r--mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/Connection.cs6
2 files changed, 12 insertions, 2 deletions
diff --git a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/ChangeLog b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/ChangeLog
index d210f5a51a7..a71ac71851a 100644
--- a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/ChangeLog
+++ b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/ChangeLog
@@ -1,3 +1,11 @@
+2009-05-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+ * Connection.cs: if the socket is already disconnected, Shutdown will
+ fail with a SocketException... Also, catch *all* the possible
+ exceptions since the socket.Close method could also throw
+ ObjectDisposedException.
+ Fixes bug #449092.
+
2008-12-20 Jeroen Asselman <jeroen-novel@asselman.com>
* Connection.cs: Apply patch from #436775, there is no need to
diff --git a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/Connection.cs b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/Connection.cs
index e6c38b4c174..1dc68151233 100644
--- a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/Connection.cs
+++ b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/Connection.cs
@@ -1150,7 +1150,9 @@ namespace Novell.Directory.Ldap
{
if(Ssl)
{
- sock.Shutdown(SocketShutdown.Both);
+ try {
+ sock.Shutdown(SocketShutdown.Both);
+ } catch {}
sock.Close();
}
else
@@ -1160,7 +1162,7 @@ namespace Novell.Directory.Ldap
socket.Close();
}
}
- catch (System.IO.IOException ie)
+ catch (Exception)
{
// ignore problem closing socket
}