mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-03-04 12:57:31 +00:00
chore: rebuild SetupContextForConn with context.AfterFunc
This commit is contained in:
9
common/contextutils/afterfunc_go121.go
Normal file
9
common/contextutils/afterfunc_go121.go
Normal file
@@ -0,0 +1,9 @@
|
||||
//go:build go1.21
|
||||
|
||||
package contextutils
|
||||
|
||||
import "context"
|
||||
|
||||
func AfterFunc(ctx context.Context, f func()) (stop func() bool) {
|
||||
return context.AfterFunc(ctx, f)
|
||||
}
|
||||
Reference in New Issue
Block a user