Skip to content

Commit

Permalink
Fixed misspelling and updated comment a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Wilkerson-Barker committed Aug 30, 2024
1 parent 5728e1f commit 3c6229a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/realm/object-store/sync/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1176,10 +1176,11 @@ void App::post(std::string&& route, UniqueFunction<void(Optional<AppError>)>&& c

void App::do_request(std::unique_ptr<Request>&& 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()) {
Expand Down

0 comments on commit 3c6229a

Please sign in to comment.