]> 127.0.0.1 Git - part/.git/commitdiff
fix v0.28.0+20230609d194861
authorqydysky <qydysky@foxmail.com>
Fri, 9 Jun 2023 01:25:52 +0000 (01:25 +0000)
committerGitHub <noreply@github.com>
Fri, 9 Jun 2023 01:25:52 +0000 (01:25 +0000)
io/io.go

index c1ad7b6e6166abf84bd48022932a023e93653d3a..fea9b2c140cf285ffe2af154b50d123eef80647c 100644 (file)
--- 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
                                }
                        }