From c7e6a578c11da79a6534fb67a61aa57c5029e08b Mon Sep 17 00:00:00 2001 From: Mygod Date: Thu, 23 Apr 2020 03:30:29 +0800 Subject: [PATCH] Suppress UDP plugin errors --- core/src/main/java/com/github/shadowsocks/bg/BaseService.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/github/shadowsocks/bg/BaseService.kt b/core/src/main/java/com/github/shadowsocks/bg/BaseService.kt index cf6cc2d398..c33d87deba 100644 --- a/core/src/main/java/com/github/shadowsocks/bg/BaseService.kt +++ b/core/src/main/java/com/github/shadowsocks/bg/BaseService.kt @@ -245,7 +245,8 @@ object BaseService { File(Core.deviceStorage.noBackupFilesDir, "stat_main"), File(configRoot, CONFIG_FILE), if (udpFallback == null) "-U" else null) - check(udpFallback?.plugin == null) { "UDP fallback cannot have plugins" } + if (udpFallback?.plugin != null) throw ExpectedExceptionWrapper(IllegalStateException( + "UDP fallback cannot have plugins")) udpFallback?.start(this, File(Core.deviceStorage.noBackupFilesDir, "stat_udp"), File(configRoot, CONFIG_FILE_UDP),