Skip to content

Commit

Permalink
Avoid crash on invalid reason
Browse files Browse the repository at this point in the history
  • Loading branch information
takekatsuhiramura committed Mar 9, 2024
1 parent 2a92cd6 commit 680b33f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/sip_message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ class IncomingRequest extends IncomingMessage {
if (code < 100 || code > 699) {
throw Exceptions.TypeError('Invalid status_code: $code');
} else if (reason != null) {
throw Exceptions.TypeError('Invalid reason_phrase: $reason');
logger.e('Invalid reason_phrase: $reason');
}

reason = reason ?? DartSIP_C.REASON_PHRASE[code] ?? '';
Expand Down

0 comments on commit 680b33f

Please sign in to comment.