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