def start(connection = nil)
if connection && connection.features.op_msg_enabled?
selector = CLIENT_FIRST_MESSAGE.merge(
payload: client_first_message, mechanism: full_mechanism)
selector[Protocol::Msg::DATABASE_IDENTIFIER] = user.auth_source
cluster_time = connection.mongos? && connection.cluster_time
selector[Operation::CLUSTER_TIME] = cluster_time if cluster_time
Protocol::Msg.new([], {}, selector)
else
Protocol::Query.new(
user.auth_source,
Database::COMMAND,
CLIENT_FIRST_MESSAGE.merge(
payload: client_first_message, mechanism: full_mechanism),
limit: -1
)
end
end