diff --git a/iris.go b/iris.go index 20b38d7c..09f24c8a 100644 --- a/iris.go +++ b/iris.go @@ -196,6 +196,7 @@ func (s *Iris) printBanner() { printTicker.OnTick(func() { if len(banner) <= int(atomic.LoadUint64(&i)) { + atomic.StoreUint64(&i, 0) printTicker.Stop() c.Add(color.FgGreen) @@ -218,7 +219,7 @@ func (s *Iris) printBanner() { }) - printTicker.Start(time.Duration(500) * time.Nanosecond) + printTicker.Start(time.Duration(433) * time.Nanosecond) } @@ -230,7 +231,7 @@ func (s *Iris) printBanner() { func (s *Iris) PreListen(opt config.Server) *server.Server { // run the printBanner with nice animation until PreListen and PostListen finish if !s.config.DisableBanner { - s.printBanner() + go s.printBanner() } // set the logger's state diff --git a/router.go b/router.go index 058e9d56..733594fc 100644 --- a/router.go +++ b/router.go @@ -217,7 +217,7 @@ func (r *router) optimize() { // optimizeLookups runs AFTER server's listen func (r *router) optimizeLookups() { - // set the isTLS on all routes and the correct full domain (if it's local its empty but we don't want that) ( we don't use Domain because it's used to the tree) + // set the isTLS on all routes and the listening full host listeningHost := r.station.server.Listener().Addr().String() for idx, _ := range r.lookups { theR := r.lookups[idx]