Skip to content

Commit

Permalink
don't call provider.Suspend
Browse files Browse the repository at this point in the history
  • Loading branch information
wwqgtxx committed Sep 12, 2024
1 parent 43337ea commit 3ce6604
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/src/main/golang/native/tunnel/suspend.go
Original file line number Diff line number Diff line change
@@ -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.
}

0 comments on commit 3ce6604

Please sign in to comment.