code: func (s *Server) Serve(l net.Listener) {
  	env := s.Env
  	if env == nil {
  		env = defaultEnv
  	}
  
  	l = netutil.KeepAliveListener(l)
  
  	go func() {
  		<-env.ctx.Done()
  		l.Close()
  	}()
  
  	env.Go(func(ctx context.Context) error {
  		generator := NewIDGenerator()
  		for {
  			conn, err := l.Accept()
  			if err != nil {
  				log.Debug("well: Listener.Accept error", map[string]interface{}{
  					"addr":  l.Addr().String(),
  					"error": err.Error(),
  				})
  				goto OUT
  			}
  
  			s.wg.Add(1)
  			go func() {
  				ctx, cancel := context.WithCancel(ctx)
  				defer func() {
  					cancel()
  					conn.Close()
  				}()
  				ctx = WithRequestID(ctx, generator.Generate())
  				s.Handler(ctx, conn)
  				s.wg.Done()
  			}()
  		}
  	OUT:
  		s.wait()
  		return nil
  	})
  }
docs: // Serve starts a managed goroutine to accept connections.
  //
  // Serve itself returns immediately.  The goroutine continues
  // to accept and handle connections until the base context is
  // canceled.
  //
  // If the listener is *net.TCPListener, TCP keep-alive is automatically
  // enabled.
  //
  // The listener l will be closed automatically when the environment's
  // Cancel is called.