opt assert for debug (#12420)

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages 2025-07-26 18:41:57 +08:00 committed by GitHub
commit 2282c8e308
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1583,7 +1583,9 @@ String bool2option(String option, bool b) {
option == kOptionForceAlwaysRelay) {
res = b ? 'Y' : defaultOptionNo;
} else {
assert(false);
if (option != kOptionEnableUdpPunch && option != kOptionEnableIpv6Punch) {
assert(false);
}
res = b ? 'Y' : 'N';
}
return res;