Skip to content

Commit bc5f4a5

Browse files
committed
crypto/tls: small bogo shim test tidying
1. onResumeShimWritesFirst is unused, replace the binding with an underscore. 2. in the bogoShim() function when looping through resumeCount+1 the tlsConn read for loop only breaks for non-nil err, so there's no need to check that again after the loop body. Updates #72006 Change-Id: Ieff45d26df33d71003a2509ea5b2b06c5fa0e1d6 Reviewed-on: https://go-review.googlesource.com/c/go/+/650715 Reviewed-by: Roland Shoemaker <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Pratt <[email protected]>
1 parent e690884 commit bc5f4a5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: src/crypto/tls/bogo_shim_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ var (
8282

8383
expectSessionMiss = flag.Bool("expect-session-miss", false, "")
8484

85-
_ = flag.Bool("enable-early-data", false, "")
86-
_ = flag.Bool("on-resume-expect-accept-early-data", false, "")
87-
_ = flag.Bool("expect-ticket-supports-early-data", false, "")
88-
onResumeShimWritesFirst = flag.Bool("on-resume-shim-writes-first", false, "")
85+
_ = flag.Bool("enable-early-data", false, "")
86+
_ = flag.Bool("on-resume-expect-accept-early-data", false, "")
87+
_ = flag.Bool("expect-ticket-supports-early-data", false, "")
88+
_ = flag.Bool("on-resume-shim-writes-first", false, "")
8989

9090
advertiseALPN = flag.String("advertise-alpn", "", "")
9191
expectALPN = flag.String("expect-alpn", "", "")
@@ -324,7 +324,7 @@ func bogoShim() {
324324
break
325325
}
326326
}
327-
if err != nil && err != io.EOF {
327+
if err != io.EOF {
328328
retryErr, ok := err.(*ECHRejectionError)
329329
if !ok {
330330
log.Fatalf("unexpected error type returned: %v", err)

0 commit comments

Comments
 (0)