def connect(group_timeout: nil, &block)
      if @connection.respond_to?(:actors)
        @connection.actors.each { |connection| connection.async.connect }
      else
        @connection.async.connect
      end
      if block
        begin
          group(timeout: group_timeout, &block)
        ensure
          disconnect
        end
      end
    end
def connect(group_timeout: nil, &block)
      if @connection.respond_to?(:actors)
        @connection.actors.each { |connection| connection.async.connect }
      else
        @connection.async.connect
      end
      if block
        begin
          group(timeout: group_timeout, &block)
        ensure
          disconnect
        end
      end
    end
@!group Instance Method Summary
 Opens the connection to the service, yields a request group, and automatically closes the connection by the end of
 the block.

 @note   Don’t use this if you opted to keep a pool of connections alive.

 @see    Connection#connect
 @see    Client#group

 @param  [Numeric] group_timeout
         the maximum amount of time to wait for a request group to halt the caller thread. Defaults to 1 hour.

 @yieldparam (see Client#group)

 @return [void]