From 510f2670fd72d7a790b5c5603d89dcb4b8ea59ae Mon Sep 17 00:00:00 2001 From: Rueian Date: Fri, 21 Jun 2024 10:59:36 +0800 Subject: [PATCH] feat: improve the initial error message by reporting CLIENT related commands fully Signed-off-by: Rueian --- pipe.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipe.go b/pipe.go index 8dace0a3..560bc2f0 100644 --- a/pipe.go +++ b/pipe.go @@ -240,8 +240,8 @@ func _newPipe(connFn func() (net.Conn, error), option *ClientOption, r2ps, nobg if !r2 && noHello.MatchString(re.string) { r2 = true continue - } else if strings.Contains(re.string, "CLIENT") { - err = fmt.Errorf("%s: %w", re.string, ErrNoCache) + } else if init[i][0] == "CLIENT" { + err = fmt.Errorf("%s: %v\n%w", re.string, init[i], ErrNoCache) } else if r2 { continue }