Skip to content

Commit

Permalink
remove redundant listener close call in ListenAndServe
Browse files Browse the repository at this point in the history
  • Loading branch information
nasdf committed Feb 6, 2024
1 parent 5f305ea commit f2f1aac
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions http/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,6 @@ func (s *Server) ListenAndServe() error {
if err != nil {
return err
}
// ignore close errors as they cannot be handled
// from the caller of this method
defer listener.Close() //nolint:errcheck

s.address.Store(listener.Addr().String())
if s.options.TLSCertPath == "" && s.options.TLSKeyPath == "" {
return s.server.Serve(listener)
Expand Down

0 comments on commit f2f1aac

Please sign in to comment.