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 19, 2024
1 parent 689405b commit c7605a9
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 c7605a9

Please sign in to comment.