Skip to content

Commit 705955b

Browse files
authored
Merge branch 'master' into fix_basic_auth_timing_oracle
2 parents 883f032 + 46ddd42 commit 705955b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,8 +1793,8 @@ func main() {
17931793
// Initializing the server in a goroutine so that
17941794
// it won't block the graceful shutdown handling below
17951795
go func() {
1796-
if err := srv.ListenAndServe(); err != nil && err != http.ErrServerClosed {
1797-
log.Fatalf("listen: %s\n", err)
1796+
if err := srv.ListenAndServe(); err != nil && errors.Is(err, http.ErrServerClosed) {
1797+
log.Printf("listen: %s\n", err)
17981798
}
17991799
}()
18001800

@@ -1812,6 +1812,7 @@ func main() {
18121812
// the request it is currently handling
18131813
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
18141814
defer cancel()
1815+
18151816
if err := srv.Shutdown(ctx); err != nil {
18161817
log.Fatal("Server forced to shutdown:", err)
18171818
}

0 commit comments

Comments
 (0)