code: func (c *client) IsConnected() bool {
  	c.RLock()
  	defer c.RUnlock()
  	status := atomic.LoadUint32(&c.status)
  	switch {
  	case status == connected:
  		return true
  	case c.options.AutoReconnect && status > connecting:
  		return true
  	default:
  		return false
  	}
  }
docs: // IsConnected returns a bool signifying whether
  // the client is connected or not.