code: func (c *client) IsConnectionOpen() bool {
  	c.RLock()
  	defer c.RUnlock()
  	status := atomic.LoadUint32(&c.status)
  	switch {
  	case status == connected:
  		return true
  	default:
  		return false
  	}
  }
docs: // IsConnectionOpen return a bool signifying whether the client has an active
  // connection to mqtt broker, i.e not in disconnected or reconnect mode