code: func (b *backend) stopAllDelegates() {
  	b.delegateUpdateMutex.Lock()
  	for _, d := range b.GetDelegates() {
  		close(d.stopChan)
  	}
  }
docs: // stopAllDelegates closes the stopChan for every delegate to enable
  // goroutines to terminate gracefully. This is a helper method to propagate
  // the primary stopChan to the current delegate map.