mirror of
https://github.com/sot-tech/mochi.git
synced 2026-07-01 22:38:59 -07:00
fix http double close
* fix docs and examples
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user