ab: read respectively and sync when set

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2022-11-28 18:16:29 +08:00
parent 5616b20879
commit 6f7eb17c48
6 changed files with 165 additions and 112 deletions

View File

@@ -923,7 +923,8 @@ bool option2bool(String option, String value) {
} else if (option.startsWith("allow-") ||
option == "stop-service" ||
option == "direct-server" ||
option == "stop-rendezvous-service") {
option == "stop-rendezvous-service" ||
option == "force-always-relay") {
res = value == "Y";
} else {
assert(false);
@@ -939,7 +940,8 @@ String bool2option(String option, bool b) {
} else if (option.startsWith('allow-') ||
option == "stop-service" ||
option == "direct-server" ||
option == "stop-rendezvous-service") {
option == "stop-rendezvous-service" ||
option == "force-always-relay") {
res = b ? 'Y' : '';
} else {
assert(false);