code: func (pe *providerEndpoint) Disconnect(args *DisconnectRequest, resp *DisconnectResponse) error {
  	defer metrics.IncrCounter([]string{"scada", "disconnect"}, 1)
  	if args.Reason == "" {
  		args.Reason = "<no reason provided>"
  	}
  	pe.p.logger.Printf("[INFO] scada-client: disconnect requested (retry: %v, backoff: %v): %v",
  		!args.NoRetry, args.Backoff, args.Reason)
  
  	// Use the backoff information
  	pe.p.backoffLock.Lock()
  	pe.p.noRetry = args.NoRetry
  	pe.p.backoff = args.Backoff
  	pe.p.backoffLock.Unlock()
  
  	// Clear the session information
  	pe.p.sessionLock.Lock()
  	pe.p.sessionID = ""
  	pe.p.sessionAuth = false
  	pe.p.sessionLock.Unlock()
  
  	// Force the disconnect
  	time.AfterFunc(DisconnectDelay, func() {
  		pe.p.clientLock.Lock()
  		if pe.p.client != nil {
  			pe.p.client.Close()
  		}
  		pe.p.clientLock.Unlock()
  	})
  	return nil
  }
docs: // Disconnect is invoked by the broker to ask us to backoff