code: func (p *Provider) run() {
  	for !p.IsShutdown() {
  		// Setup a new connection
  		client, err := p.clientSetup()
  		if err != nil {
  			p.wait()
  			continue
  		}
  
  		// Handle the session
  		doneCh := make(chan struct{})
  		go p.handleSession(client, doneCh)
  
  		// Wait for session termination or shutdown
  		select {
  		case <-doneCh:
  			p.wait()
  		case <-p.shutdownCh:
  			p.clientLock.Lock()
  			client.Close()
  			p.clientLock.Unlock()
  			return
  		}
  	}
  }
docs: // run is a long running routine to manage the provider