diff --git a/src/realm/object-store/sync/app.cpp b/src/realm/object-store/sync/app.cpp index f1b7350fed..6f21614415 100644 --- a/src/realm/object-store/sync/app.cpp +++ b/src/realm/object-store/sync/app.cpp @@ -1176,10 +1176,11 @@ void App::post(std::string&& route, UniqueFunction)>&& c void App::do_request(std::unique_ptr&& request, IntermediateCompletion&& completion, bool update_location) { - // NOTE: Since the calls to `send_request_to_server()` or `upldate_location_and_resend()` do not + // NOTE: Since the calls to `send_request_to_server()` or `update_location_and_resend()` do not // capture a shared_ptr to App as part of their callback, any function that calls `do_request()` - // needs to capture the App as `self = shared_from_this()` to ensure the lifetime of the App - // object is extended until the callback is called after the operation is complete. + // or `do_authenticated_request()` needs to capture the App as `self = shared_from_this()` for + // the completion callback to ensure the lifetime of the App object is extended until the + // callback is called after the operation is complete. // Verify the request URL to make sure it is valid if (auto valid_url = util::Uri::try_parse(request->url); !valid_url.is_ok()) {