protected virtual void SafeWriteRecord(byte type, byte[] buf, int offset, int len) { try { mRecordStream.WriteRecord(type, buf, offset, len); } catch (TlsFatalAlert tlsFatalAlert) { if (!mClosed) { FailWithError(2, tlsFatalAlert.AlertDescription, "Failed to write record", tlsFatalAlert); } throw tlsFatalAlert; IL_0038 :; } catch (Exception ex) { if (!mClosed) { FailWithError(2, 80, "Failed to write record", ex); } throw ex; IL_005c :; } }