Skip to content

Commit 84a51ec

Browse files
authored
Add error checking in load-generator and ocsp_forever (letsencrypt#4765)
Found by golangci-lint's errcheck invocation.
1 parent 0a0a776 commit 84a51ec

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

test/load-generator/boulder-calls.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ func completeAuthorization(authz *core.Authorization, s *State, ctx *context) er
337337

338338
// Poll the authorization waiting for the challenge response to be recorded in
339339
// a change of state. The polling may sleep and retry a few times if required
340-
pollAuthorization(authz, s, ctx)
340+
err = pollAuthorization(authz, s, ctx)
341341
if err != nil {
342342
return err
343343
}

test/ocsp/ocsp_forever/main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,12 @@ func main() {
7979
log.Fatal(err)
8080
}
8181
http.Handle("/metrics", promhttp.Handler())
82-
go http.ListenAndServe(*listenAddress, nil)
82+
go func() {
83+
err = http.ListenAndServe(*listenAddress, nil)
84+
if err != nil && err != http.ErrServerClosed {
85+
log.Fatal(err)
86+
}
87+
}()
8388
for {
8489
for _, pattern := range flag.Args() {
8590
// Note: re-glob this pattern on each run, in case new certificates have

0 commit comments

Comments
 (0)