Skip to content

Commit

Permalink
check for listen errors (fixes #232)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpillora committed Jan 13, 2021
1 parent 2092107 commit 87675c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/server_listen.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ func (s *Server) listener(host, port string) (net.Listener, error) {
}
//tcp listen
l, err := net.Listen("tcp", host+":"+port)
if err != nil {
return nil, err
}
//optionally wrap in tls
proto := "http"
if tlsConf != nil {
Expand Down

0 comments on commit 87675c4

Please sign in to comment.