Skip to content

Commit

Permalink
Fix serving files (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler authored Aug 26, 2024
1 parent 4798ab5 commit b990a10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Benchmarks/Benchmarks/Router/RouterBenchmarks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ func routerBenchmarks() {
for try await buffer in request.body {
try await writer.write(buffer)
}
try await writer.finish(nil)
})
}
}
Expand Down
1 change: 1 addition & 0 deletions Sources/Hummingbird/Files/FileIO.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public struct FileIO: Sendable {
fileOffset = range.index(fileOffset, offsetBy: bytesToRead)
try await writer.write(buffer)
}
try await writer.finish(nil)
}
}
}
Expand Down

0 comments on commit b990a10

Please sign in to comment.