Skip to content

Commit

Permalink
Update AsyncFileStreamer.h (#1712)
Browse files Browse the repository at this point in the history
Typo in AsyncFileStreamer.
  • Loading branch information
mvictoras authored Oct 26, 2024
1 parent cb4d9e6 commit b75be6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/helpers/AsyncFileStreamer.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct AsyncFileStreamer {
static void streamFile(uWS::HttpResponse<SSL> *res, AsyncFileReader *asyncFileReader) {
/* Peek from cache */
std::string_view chunk = asyncFileReader->peek(res->getWriteOffset());
auto remaining_data = r->getFileSize() - res->getWriteOffset();
auto remaining_data = asyncFileReader->getFileSize() - res->getWriteOffset();
if (!chunk.length() || res->tryEnd(chunk, remaining_data).first) {
/* Request new chunk */
// todo: we need to abort this callback if peer closed!
Expand Down

0 comments on commit b75be6b

Please sign in to comment.