commit
3bcb79129c
1 changed files with 10 additions and 2 deletions
|
@ -164,9 +164,17 @@ func (f *Frontend) listenAndServe() error {
|
|||
f.srv.SetKeepAlivesEnabled(false)
|
||||
|
||||
// Start the HTTP server.
|
||||
if f.tlsCfg != nil {
|
||||
// ... using TLS.
|
||||
if err := f.srv.ListenAndServeTLS("", ""); err != http.ErrServerClosed {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
// ... using plain TCP.
|
||||
if err := f.srv.ListenAndServe(); err != http.ErrServerClosed {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue