From 5aebf2729483270cac7db84bca5d7d532e377102 Mon Sep 17 00:00:00 2001 From: peter zhang Date: Sun, 30 Mar 2025 20:38:29 +0800 Subject: [PATCH] fix typo --- common/task/task.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/task/task.go b/common/task/task.go index eeba1dcd..9a4f9cb6 100644 --- a/common/task/task.go +++ b/common/task/task.go @@ -6,7 +6,7 @@ import ( "github.com/xtls/xray-core/common/signal/semaphore" ) -// OnSuccess executes g() after f() returns nil. +// OnSuccess executes g() after f() returns error. func OnSuccess(f func() error, g func() error) func() error { return func() error { if err := f(); err != nil {