From 3ce66040b3966deec8e4a61d4e8b8a4a71cdeced Mon Sep 17 00:00:00 2001 From: wwqgtxx Date: Thu, 12 Sep 2024 11:10:08 +0800 Subject: [PATCH] don't call provider.Suspend --- core/src/main/golang/native/tunnel/suspend.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/main/golang/native/tunnel/suspend.go b/core/src/main/golang/native/tunnel/suspend.go index 66db89bf..8926eb23 100644 --- a/core/src/main/golang/native/tunnel/suspend.go +++ b/core/src/main/golang/native/tunnel/suspend.go @@ -1,7 +1,9 @@ package tunnel -import "github.com/metacubex/mihomo/adapter/provider" - func Suspend(s bool) { - provider.Suspend(s) + // cause by ACTION_SCREEN_OFF/ACTION_SCREEN_ON, + // but we don't know what should do so just ignored. + // + // WARNING: don't call core's Tunnel.OnSuspend/OnRunning at here, + // this will cause the core to stop processing new incoming connections when the screen is locked. }