public override int EndRead(IAsyncResult asyncResult) {
if (asyncResult==null) {
throw new ArgumentNullException("asyncResult");
}
try{
return base.EndRead(asyncResult);
}
catch(Exception e){
try{
if (NclUtilities.IsFatal(e)) throw;
if(e is System.IO.InvalidDataException || e is InvalidOperationException || e is IndexOutOfRangeException){
Close();
}
}
catch{
}
throw e;
}
}