Skip to content

Commit

Permalink
feat: improve the initial error message by reporting CLIENT related c…
Browse files Browse the repository at this point in the history
…ommands fully

Signed-off-by: Rueian <[email protected]>
  • Loading branch information
rueian committed Jun 25, 2024
1 parent 5e50cd6 commit 6bd013e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 6bd013e

Please sign in to comment.