Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/linux-build-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,14 @@ jobs:
# The suite's C build compiles ~7,000 translation units, several of them
# large, with full debug info. On ubuntu-24.04-arm it exhausted memory and
# the runner was shut down mid-build, twice at the same step; extra swap
# lets the peak spill instead of taking the machine down.
- name: Add swap (arm64)
if: matrix.arch == 'arm64'
# lets the peak spill instead of taking the machine down. x64 joined it once
# the suite grew (#6118, #6106): every x64 run since went silent in
# `cmake --build` and was shut down about an hour in, while arm64 passed --
# the arm64 symptom exactly. `df` is here so a recurrence shows whether the
# disk, not memory, is what ran out.
- name: Add swap
run: |
df -h /
free -m
sudo fallocate -l 12G /cn1-swapfile
sudo chmod 600 /cn1-swapfile
Expand Down
10 changes: 7 additions & 3 deletions vm/backend/src/com/codename1/backend/HttpServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -9271,15 +9271,19 @@ private void writeHeadAndBody(Conn conn, int fd, long session, Response response
}

if (streamed) {
// A bodiless response's writer is closed before the head is written, so
// the close happens-before anything the client does after reading the
// status. Closing it after the write let the client run ahead of it.
if (noBody) {
response.discard();
}
try {
writeTo(fd, session, conn.out, 0, conn.outLength);
} catch (IOException | RuntimeException headFailed) {
response.discard();
throw headFailed;
}
if (noBody) {
response.discard();
} else {
if (!noBody) {
ResponseOutput output = new ResponseOutput(fd, session, chunked, null, 0); //NOPMD CloseResource - complete flushes on success; failure must abort and the connection owns the socket.
response.bodyWriter.writeTo(output);
output.complete();
Expand Down
Loading