Skip to content

Commit

Permalink
[eval] run GC while downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz committed Apr 29, 2024
1 parent 0f29726 commit 51b28f6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions std/sys/Http.hx
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,9 @@ class Http extends haxe.http.HttpBase {
var len = sock.input.readBytes(buf, 0, if (size > bufsize) bufsize else size);
api.writeBytes(buf, 0, len);
size -= len;

// TODO: this shouldn't be needed on "user" code
#if eval eval.vm.Gc.minor(); #end
}
} catch (e:haxe.io.Eof) {
throw "Transfer aborted";
Expand Down

0 comments on commit 51b28f6

Please sign in to comment.