// TODO: shutdown in parallel
shutdown in parallel
// TODO : shutdown in parallel
func (w *worker) stop() {
	w.Lock()
	defer w.Unlock()
	for _, server := range w.servers {
		ctx, cancel := context.WithTimeout(context.TODO(), w.opt.stopTimeout)
		defer cancel()
		err := server.Shutdown(ctx)
		if err != nil {
			fmt.Printf("shutdown server error: %v\n", err)
		}
	}
}
func ( w * worker ) stop ( ) { w . Lock ( ) defer w . Unlock ( ) for _ , server := range w . servers { ctx , cancel := context . WithTimeout ( context . TODO ( ) , w . opt . stopTimeout ) defer cancel ( ) err := server . Shutdown ( ctx ) if err != nil { fmt . Printf ( " \n " , err ) } } }
shutdown in parallel
shutdown in parallel