code: func (s *Server) Stop() error {
  	if err := gwbackend.Backend().Close(); err != nil {
  		return fmt.Errorf("close gateway backend error: %s", err)
  	}
  	log.Info("waiting for pending actions to complete")
  	s.wg.Wait()
  	return nil
  }
docs: // Stop closes the gateway backend and waits for the server to complete the
  // pending packets.