Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: blagoev <lubo@blagoev.com>
  • Loading branch information
nielsenko and blagoev committed Mar 28, 2022
1 parent b5f294e commit 573e4ea
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/src/native/realm_core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class _RealmCore {
}

static void request_callback(Object userData, realm_http_request request, Pointer<Void> request_context) {
() async { // TODO: Use another isolate, perhaps?
() async {
final client = userData as HttpClient;
client.connectionTimeout = Duration(milliseconds: request.timeout_ms);
try {
Expand Down Expand Up @@ -232,12 +232,11 @@ class _RealmCore {
final response_pointer = arena<realm_http_response>();
final responseRef = response_pointer.ref;

responseRef.body = responseBody.toInt8Ptr(arena); // need to copy here :-(
responseRef.body = responseBody.toInt8Ptr(arena);
responseRef.body_size = responseBody.length;

int headerCnt = 0;
response.headers.forEach((name, values) {
// Freaking odd interface :-/
headerCnt += values.length;
});

Expand Down

0 comments on commit 573e4ea

Please sign in to comment.