private void Abort()
{
// On older Mono versions a racing condition can arise here
lock (this.fSyncRoot)
{
if (!this.DataSocket.Connected)
{
return;
}
try
{
this.DataSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Linger, new LingerOption(false, 0));
}
catch (Exception)
{
// Ignore anything. This connection is dead anyway
}
this.DataSocketClose();
}
}