private void SafeConnectionClose()
{
try
{
// workaround for a .net bug: http://support.microsoft.com/kb/821625
if (Bstream != null)
Bstream.Close();
}
catch { }
try
{
if (sslStream != null)
sslStream.Close();
}
catch { }
try
{
if (socket != null)
socket.Close();
}
catch { }
Bstream = null;
sslStream = null;
socket = null;
}
}