protected virtual void DataSocketClose()
{
// On older Mono versions a racing condition can arise here
lock (this.fSyncRoot)
{
try
{
if (!this.DataSocket.Connected)
return;
try
{
this.DataSocket.Shutdown(SocketShutdown.Both);
}
catch (SocketException)
{
}
try
{
this.DataSocket.Close();
}
catch (SocketException)
{
}
}
catch (ObjectDisposedException)
{
}
}
}