Skip to content

Commit 03179ce

Browse files
neildgopherbot
authored andcommitted
quic: report error string when peer closes connection
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]>
1 parent 4428704 commit 03179ce

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

quic/errors.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ type ApplicationError struct {
121121
}
122122

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

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

0 commit comments

Comments
 (0)