From: qydysky Date: Fri, 9 Jun 2023 01:25:52 +0000 (+0000) Subject: fix X-Git-Tag: v0.28.0+20230609d194861 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=d194861be325771d5852557cdcc56347d09a3e23;p=part%2F.git fix --- diff --git a/io/io.go b/io/io.go index c1ad7b6..fea9b2c 100644 --- a/io/io.go +++ b/io/io.go @@ -80,14 +80,14 @@ func WithCtxTO(ctx context.Context, callTree string, to time.Duration, w io.Writ return } else if now := time.Now(); old > 0 && now.Unix()-old > int64(to.Seconds()) { if old != 0 { - panicf[0](fmt.Sprintf("write blocking while close %vs > %v, goruntime leak \n%v", now.Unix()-old, to, callTree)) + panicf[0](fmt.Sprintf("rw blocking while close %vs > %v, goruntime leak \n%v", now.Unix()-old, to, callTree)) } } else { time.AfterFunc(to, func() { if old := chanw.Load(); old == -1 { return } else if now := time.Now(); old > 0 && now.Unix()-old > int64(to.Seconds()) { - panicf[0](fmt.Sprintf("write blocking after close %vs > %v, goruntime leak \n%v", now.Unix()-old, to, callTree)) + panicf[0](fmt.Sprintf("rw blocking after close %vs > %v, goruntime leak \n%v", now.Unix()-old, to, callTree)) } }) } @@ -96,7 +96,7 @@ func WithCtxTO(ctx context.Context, callTree string, to time.Duration, w io.Writ if old := chanw.Load(); old == -1 { return } else if old > 0 && now.Unix()-old > int64(to.Seconds()) { - panicf[0](fmt.Sprintf("write blocking after rw %vs > %v, goruntime leak \n%v", now.Unix()-old, to, callTree)) + panicf[0](fmt.Sprintf("rw blocking after rw %vs > %v, goruntime leak \n%v", now.Unix()-old, to, callTree)) return } }