fix http double close

* fix docs and examples
This commit is contained in:
Lawrence, Rendall
2022-10-27 03:32:39 +03:00
parent 1f93e30c11
commit 352c09031b
4 changed files with 42 additions and 30 deletions
-3
View File
@@ -135,9 +135,6 @@ func NewFrontend(c conf.MapConfig, logic *middleware.Logic) (_ frontend.Frontend
go func() {
ln, err := cfg.ListenTCP()
defer func() {
logger.Err(ln.Close()).Msg("closing listener")
}()
if err == nil {
if f.srv.TLSConfig == nil {
err = f.srv.Serve(ln)