internal void Failed(SocketError failureReason) { DeliveryPending = false; DeliveryFailed = true; TransactionTraceMessage?.Invoke(this, $"Transaction failed {failureReason} {this.TransactionFinalResponse?.ShortDescription}"); TransactionFailed?.Invoke(this, failureReason); UpdateTransactionState(SIPTransactionStatesEnum.Terminated); }
/// <summary> /// Marks a transaction as expired and prevents any more delivery attempts of outstanding /// requests of responses. /// </summary> internal void Expire(DateTime now) { DeliveryPending = false; DeliveryFailed = true; TimedOutAt = now; HasTimedOut = true; TransactionTraceMessage?.Invoke(this, $"Transaction failed due to a timeout {this.TransactionFinalResponse?.ShortDescription}"); TransactionFailed?.Invoke(this, SocketError.TimedOut); UpdateTransactionState(SIPTransactionStatesEnum.Terminated); }