continue at any case on print banner

This commit is contained in:
Makis Maropoulos 2016-06-02 05:11:51 +03:00
parent 9a38c34911
commit bd13342149

View File

@ -175,6 +175,13 @@ func (s *Iris) initMailService() {
func (s *Iris) printBanner() { func (s *Iris) printBanner() {
c := color.New(color.FgHiBlue).Add(color.Bold) c := color.New(color.FgHiBlue).Add(color.Bold)
printTicker := utils.NewTicker() printTicker := utils.NewTicker()
// for ANY case, we don't want to panic on print banner if anything goes bad
defer func() {
if r := recover(); r != nil {
printTicker.Stop()
}
}()
i := 0 i := 0
printTicker.OnTick(func() { printTicker.OnTick(func() {
if len(banner) <= i { if len(banner) <= i {