Skip to content

Commit

Permalink
quic: report error string when peer closes connection
Browse files Browse the repository at this point in the history
Change-Id: I2eaf8ef90dc84440e9d38b4d0573c9f6e44f71b0
Reviewed-on: https://go-review.googlesource.com/c/net/+/640798
Reviewed-by: Jonathan Amsterdam <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Damien Neil <[email protected]>
  • Loading branch information
neild authored and gopherbot committed Jan 7, 2025
1 parent 4428704 commit 03179ce
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions quic/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ type ApplicationError struct {
}

func (e *ApplicationError) Error() string {
// TODO: Include the Reason string here, but sanitize it first.
return fmt.Sprintf("AppError %v", e.Code)
return fmt.Sprintf("peer closed connection: %v: %q", e.Code, e.Reason)
}

// Is reports a match if err is an *ApplicationError with a matching Code.
Expand Down

0 comments on commit 03179ce

Please sign in to comment.