Skip to content

Commit

Permalink
fix the sneaky variable hidden behind ifdefs
Browse files Browse the repository at this point in the history
Capture by-reference is probably what was intended
from the start, seeing how the buffer is passed.
  • Loading branch information
radistmorse committed Aug 6, 2024
1 parent 7a6abaf commit 364c722
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/pistache/transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ namespace Pistache::Tcp
// Always enqueue reponses for sending. Giving preference to consumer
// context means chunked responses could be sent out of order.
return Async::Promise<ssize_t>(
[fd, buffer, flags, this](Async::Deferred<ssize_t> deferred) mutable {
[&, this](Async::Deferred<ssize_t> deferred) mutable {
BufferHolder holder { buffer };
WriteEntry write(std::move(deferred), std::move(holder),
fd, flags
Expand Down

0 comments on commit 364c722

Please sign in to comment.